Southern Methodist University 6306-Doing Data Science:Case Study 2

In this case study, we will do some analysis on the data given by the client: DDSAnalytics. The client is is interested in knowing the top influential factors that lead to attrition and high monthly income of an employee for their company.

For this analysis, we will do the following steps:

Load the required libraries

## Loading required package: carData
## randomForest 4.6-14
## Type rfNews() to see new features/changes/bug fixes.
## corrplot 0.84 loaded
## 
## Attaching package: 'dplyr'
## The following object is masked from 'package:randomForest':
## 
##     combine
## The following object is masked from 'package:car':
## 
##     recode
## The following object is masked from 'package:MASS':
## 
##     select
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.3     ✓ purrr   0.3.4
## ✓ tibble  3.1.0     ✓ stringr 1.4.0
## ✓ tidyr   1.1.3     ✓ forcats 0.5.1
## ✓ readr   1.4.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::combine()  masks randomForest::combine()
## x dplyr::filter()   masks stats::filter()
## x dplyr::lag()      masks stats::lag()
## x ggplot2::margin() masks randomForest::margin()
## x dplyr::recode()   masks car::recode()
## x dplyr::select()   masks MASS::select()
## x purrr::some()     masks car::some()
## Loading required package: lattice
## 
## Attaching package: 'caret'
## The following object is masked from 'package:purrr':
## 
##     lift
## 
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
## 
##     lowess
## 
## Attaching package: 'olsrr'
## The following object is masked from 'package:MASS':
## 
##     cement
## The following object is masked from 'package:datasets':
## 
##     rivers
## 
## Attaching package: 'ggpubr'
## The following object is masked from 'package:cowplot':
## 
##     get_legend
## 
## Attaching package: 'rstatix'
## The following object is masked from 'package:MASS':
## 
##     select
## The following object is masked from 'package:stats':
## 
##     filter
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
## 
## Attaching package: 'mice'
## The following object is masked from 'package:stats':
## 
##     filter
## The following objects are masked from 'package:base':
## 
##     cbind, rbind
## Loading required package: colorspace
## Loading required package: grid
## VIM is ready to use.
## Suggestions and bug-reports can be submitted at: https://github.com/statistikat/VIM/issues
## 
## Attaching package: 'VIM'
## The following object is masked from 'package:datasets':
## 
##     sleep
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:MASS':
## 
##     select
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
## 
## Attaching package: 'maps'
## The following object is masked from 'package:purrr':
## 
##     map
## 
## Attaching package: 'ggthemes'
## The following object is masked from 'package:cowplot':
## 
##     theme_map
## 
## Attaching package: 'table1'
## The following objects are masked from 'package:base':
## 
##     units, units<-

Import and inspect data

Read the data from GitHub

  • The data is fetched from github account.
  • The data has 36 variables and 870 entries.
  • Plot the histogram for all the variables
case2 = read.csv("https://raw.githubusercontent.com/RashmiAPatel19/SMU_MSDS_6306_CaseStudy2_Spring2021/main/CaseStudy2-data.csv", header = TRUE)
head(case2)
##   ID Age Attrition    BusinessTravel DailyRate             Department
## 1  1  32        No     Travel_Rarely       117                  Sales
## 2  2  40        No     Travel_Rarely      1308 Research & Development
## 3  3  35        No Travel_Frequently       200 Research & Development
## 4  4  32        No     Travel_Rarely       801                  Sales
## 5  5  24        No Travel_Frequently       567 Research & Development
## 6  6  27        No Travel_Frequently       294 Research & Development
##   DistanceFromHome Education   EducationField EmployeeCount EmployeeNumber
## 1               13         4    Life Sciences             1            859
## 2               14         3          Medical             1           1128
## 3               18         2    Life Sciences             1           1412
## 4                1         4        Marketing             1           2016
## 5                2         1 Technical Degree             1           1646
## 6               10         2    Life Sciences             1            733
##   EnvironmentSatisfaction Gender HourlyRate JobInvolvement JobLevel
## 1                       2   Male         73              3        2
## 2                       3   Male         44              2        5
## 3                       3   Male         60              3        3
## 4                       3 Female         48              3        3
## 5                       1 Female         32              3        1
## 6                       4   Male         32              3        3
##                  JobRole JobSatisfaction MaritalStatus MonthlyIncome
## 1        Sales Executive               4      Divorced          4403
## 2      Research Director               3        Single         19626
## 3 Manufacturing Director               4        Single          9362
## 4        Sales Executive               4       Married         10422
## 5     Research Scientist               4        Single          3760
## 6 Manufacturing Director               1      Divorced          8793
##   MonthlyRate NumCompaniesWorked Over18 OverTime PercentSalaryHike
## 1        9250                  2      Y       No                11
## 2       17544                  1      Y       No                14
## 3       19944                  2      Y       No                11
## 4       24032                  1      Y       No                19
## 5       17218                  1      Y      Yes                13
## 6        4809                  1      Y       No                21
##   PerformanceRating RelationshipSatisfaction StandardHours StockOptionLevel
## 1                 3                        3            80                1
## 2                 3                        1            80                0
## 3                 3                        3            80                0
## 4                 3                        3            80                2
## 5                 3                        3            80                0
## 6                 4                        3            80                2
##   TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany
## 1                 8                     3               2              5
## 2                21                     2               4             20
## 3                10                     2               3              2
## 4                14                     3               3             14
## 5                 6                     2               3              6
## 6                 9                     4               2              9
##   YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
## 1                  2                       0                    3
## 2                  7                       4                    9
## 3                  2                       2                    2
## 4                 10                       5                    7
## 5                  3                       1                    3
## 6                  7                       1                    7
dim(case2)
## [1] 870  36
plot_histogram(case2)

str(case2)
## 'data.frame':    870 obs. of  36 variables:
##  $ ID                      : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ Age                     : int  32 40 35 32 24 27 41 37 34 34 ...
##  $ Attrition               : chr  "No" "No" "No" "No" ...
##  $ BusinessTravel          : chr  "Travel_Rarely" "Travel_Rarely" "Travel_Frequently" "Travel_Rarely" ...
##  $ DailyRate               : int  117 1308 200 801 567 294 1283 309 1333 653 ...
##  $ Department              : chr  "Sales" "Research & Development" "Research & Development" "Sales" ...
##  $ DistanceFromHome        : int  13 14 18 1 2 10 5 10 10 10 ...
##  $ Education               : int  4 3 2 4 1 2 5 4 4 4 ...
##  $ EducationField          : chr  "Life Sciences" "Medical" "Life Sciences" "Marketing" ...
##  $ EmployeeCount           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ EmployeeNumber          : int  859 1128 1412 2016 1646 733 1448 1105 1055 1597 ...
##  $ EnvironmentSatisfaction : int  2 3 3 3 1 4 2 4 3 4 ...
##  $ Gender                  : chr  "Male" "Male" "Male" "Female" ...
##  $ HourlyRate              : int  73 44 60 48 32 32 90 88 87 92 ...
##  $ JobInvolvement          : int  3 2 3 3 3 3 4 2 3 2 ...
##  $ JobLevel                : int  2 5 3 3 1 3 1 2 1 2 ...
##  $ JobRole                 : chr  "Sales Executive" "Research Director" "Manufacturing Director" "Sales Executive" ...
##  $ JobSatisfaction         : int  4 3 4 4 4 1 3 4 3 3 ...
##  $ MaritalStatus           : chr  "Divorced" "Single" "Single" "Married" ...
##  $ MonthlyIncome           : int  4403 19626 9362 10422 3760 8793 2127 6694 2220 5063 ...
##  $ MonthlyRate             : int  9250 17544 19944 24032 17218 4809 5561 24223 18410 15332 ...
##  $ NumCompaniesWorked      : int  2 1 2 1 1 1 2 2 1 1 ...
##  $ Over18                  : chr  "Y" "Y" "Y" "Y" ...
##  $ OverTime                : chr  "No" "No" "No" "No" ...
##  $ PercentSalaryHike       : int  11 14 11 19 13 21 12 14 19 14 ...
##  $ PerformanceRating       : int  3 3 3 3 3 4 3 3 3 3 ...
##  $ RelationshipSatisfaction: int  3 1 3 3 3 3 1 3 4 2 ...
##  $ StandardHours           : int  80 80 80 80 80 80 80 80 80 80 ...
##  $ StockOptionLevel        : int  1 0 0 2 0 2 0 3 1 1 ...
##  $ TotalWorkingYears       : int  8 21 10 14 6 9 7 8 1 8 ...
##  $ TrainingTimesLastYear   : int  3 2 2 3 2 4 5 5 2 3 ...
##  $ WorkLifeBalance         : int  2 4 3 3 3 2 2 3 3 2 ...
##  $ YearsAtCompany          : int  5 20 2 14 6 9 4 1 1 8 ...
##  $ YearsInCurrentRole      : int  2 7 2 10 3 7 2 0 1 2 ...
##  $ YearsSinceLastPromotion : int  0 4 2 5 1 1 0 0 0 7 ...
##  $ YearsWithCurrManager    : int  3 9 2 7 3 7 3 0 0 7 ...

Initial Data Cleaning

Check the variables with vague information and remove the variables

  • The variable Over18 has all Y in it as every employee is above 18 years, so we will remove the column.
  • The variable EmployeeCount has all 1 in its row, so we will remove the column.
  • Since the EmployeeNumber is unique for every employee it will not contribute to the model, so we will remove this column.
  • The variable StandardHours, has all values equal to 80, so we will remove it because it will not contribute anything to the model.
  • The variable Performance Rating has little vague information in it just 3 and 4, so we will remove it.
  • The variables DailyRate, MonthlyRate, and HourlyRate has no meaning as they are all same in sense and related to monthly income.
  • After removing these variables we are left with 27 variables and 870 entries.
# Checking if the some employees are ages: But no employees were found under 18, so we will remove this variable
unique(case2$Over18)
## [1] "Y"
# Checking for the unique employee count: But every employee count has value=1, so we will remove this variable
unique(case2$EmployeeCount)
## [1] 1
#Checking the employee number: But no duplicate values were found, so we will remove this variable
unique(case2$EmployeeNumber)
##   [1]  859 1128 1412 2016 1646  733 1448 1105 1055 1597 1866 1858  845  508 1314
##  [16]  947  966  487 1755 1903  699  712  663 1613  969 1267 1582 1157 1968  791
##  [31]  195 1698  363 1172 1966  359 1639 1733 1338 1135 1824  783 1674 1595 1270
##  [46] 1480 1734 1119  614  218  662 1423 1246  972   98 1772  752 1586  380 1273
##  [61]  967 1312 1996 1839 1219   21  691 1982   88  391 1999 1469  261 1158 1319
##  [76]   57 1535 1602  302 1974 1033 1728 1997  474 1294 1032  728 1010   56   38
##  [91]  556 1165    4 1587  226  387 1527  139 1513 1447 1434 1453  523  705 1472
## [106] 1177  208 1973 1821 2038 1154  976 1118  771 1218  904 1240 2053  227 1383
## [121]  742 2021  864  709  388 1962   33 1888 1402 1863 1669 1757  551 1654  448
## [136]  807  816 1013  932  152 1373 1308 1007  378 1375  469  252 1560 1173 1622
## [151]  650  722  420 1814  934  475 1986 1127 1126 1242  104 1082  677  347  406
## [166]  922 1655  612  630 1120  747 1934  624 1268  981 1131  787 1053  207  230
## [181] 1182 1355  171 1525  602  377 1653 1676  385  129  441 1833  550  595 1407
## [196]  353  116 1138   36  643  986   96  830  741  330  913 1188  282  197  176
## [211] 2034 1029  715  827  700 1474  634 1900  194 1275  786  684 1681 1506 1940
## [226] 1989   53  284  128 1661 1635   49 1716  303  158  970 2031  679 1987 1656
## [241]  605 1306   94 1439 1150  912  462 2013 1392  625 1994  990  834 1842 1468
## [256] 1813  399 1428 1882 1992 1379 1522  325  974  150   14 1485 1692 1970 1084
## [271] 1845 1658 1864 1436  254 1191  511  430  142 1501 1706  957 1822  438 1152
## [286] 1549 1878   18  154  805  996  419  260 2000 1550 2003  256  147  991  440
## [301]  889   74 1694 2008  977  888 1030 1115 1034  707 1580  601 1537  211  732
## [316] 1003  216 1981 1390 1269  951  683  861 1080 1026  933 1608 1998 1937 1408
## [331] 1677  291 1792  725  140 1101 1137 1103 1113   54   51 1296 1099  680 1211
## [346] 1975 1140  384 1206  762 1911  416 1180 1552 1815 1478  164  565   78  373
## [361]  259 1928 1038  352 1336  532 1285 1548 1592  439 1011  567  425 1640 1680
## [376] 1539 1042 1943 1202 1004  447  177 1466  113 1081  950  314  611 1710  478
## [391]  808   72 1948  573  875  426  575 1467 2026 1496  548  270 1856 1651  856
## [406]  661 1784 1221   23  843  878 1708   61 1853  555 1804  571  407 1196  564
## [421]  110  529  163 1368 1387 1076 1482  379  331  339  437 1340 1420 1762  954
## [436]  458  828 1952   47  724 1235 1709  364 1683 1789 1438 1668 1803   79 1612
## [451] 2009 1475 1797 1924  664 1740 1673  120 1441 1435  591 1659  174 1736 1767
## [466]   24 1556   97 1037  250 1931 1868  101  192 1102   62  868  618 1409 2017
## [481] 1954  895 1932  241  165    1 1876   16   64  757  396 1317 1650 1529 1880
## [496]  851  544  403   13 1929 1360   19 1691   20 1443 1555  485 1391  311   58
## [511] 2041 1397 1720   73  484  408  952 1768 1311 1907  838 1604   86  638  309
## [526] 1050  240 1251  105  161 1088 1585  824 1955  454  262 1125  470  554 1171
## [541] 1224 1798  224  271  804 1701  944  832  421 1049  734  869 1890  945  287
## [556]  656  578  649  836  476  238 1837 1001 1979  806 2020  362 1562  936 1005
## [571] 1909  923 1927 1823  641   77 1961 1471 1633 1260 1358  468 1766  846   40
## [586]  281  107   27 1411   75 1605 1489 1486 1617 1628  855  899  521 2064   45
## [601] 1495 1574 1015 1192 1752  730   91  382 1417 1044 1369  616  328  959  982
## [616] 1696 1502   68 2062  704  137  987  797 2040 1504 1259 1445  461 1096  717
## [631] 1873 1950 1036  155  451 1185 1109 1951  639  667   11 1829 1074 1905 1210
## [646]  215 1156 1718  100 1649 1564 1233 1166  473  593  390  296 1520  466   85
## [661]  772  579 1732 1028   60 1753  312  584 1309 1250  102 1670 1507  881 1647
## [676] 1280  823 1985 2025  941  885  525 1682  223  221  581 1421  305  243 1805
## [691] 1563  376  477  514 1700  925 1644  304 1624 1217 1865 1163 1243 1818  321
## [706]  599 1830 1461 1782  905 1321  568 1258  481  789 1714 1179 1097 1667 1121
## [721]  689 1631 1431 1073 1860  350  900  277  622  169  920  445 1944  631 1577
## [736] 1898 2056 1254  975  652  183  613 1543 1735 2018 1551 1844 1184 1725  242
## [751] 1077 1331 1606 1869  126  744  942 1473 1687 1277  994  820 1329 1040  847
## [766] 1611 1085  615 1228 1117  446  244  343   90 1547  784 1499 1190 1693 2027
## [781]  248  721  910 1220 1731 1430 1786  433 1770 1303 1509  247 1638   83  275
## [796]  702  372 1783 1248 1664   52  604  429 1100  132 1790 1399  217 1729  233
## [811]  239 1415  507 1625  893 1238  833  817  198 1933 1607  349 2035 1160 1614
## [826] 1069 1761 1281 1760  644 1002  167 1216 1193 1278  626 1394  621 1827 1867
## [841]  405 1419  867 1344 1779  536  201  417  492 1918  175   41   15  412 1886
## [856] 1492  297  442  200 1295 1297 1293  502  746 1465 1363  333 1503 1195  269
# Checking he unique values in standard hours: But no values other than 80 found, so we will variable this variable
unique(case2$StandardHours)
## [1] 80
# Checking the unique values of Performance rating: But the the values were kind of vague how it is assigned to employees,so we will remove this variable
unique(case2$PerformanceRating)
## [1] 3 4
# Removing the DailyRate, HourlyRate, MonthlyRate because the the meaning is unclear 
case2=select(case2,-c(ID,Over18, EmployeeCount, StandardHours, EmployeeNumber, DailyRate, HourlyRate, MonthlyRate, PerformanceRating))
dim(case2)
## [1] 870  27
colnames(case2)
##  [1] "Age"                      "Attrition"               
##  [3] "BusinessTravel"           "Department"              
##  [5] "DistanceFromHome"         "Education"               
##  [7] "EducationField"           "EnvironmentSatisfaction" 
##  [9] "Gender"                   "JobInvolvement"          
## [11] "JobLevel"                 "JobRole"                 
## [13] "JobSatisfaction"          "MaritalStatus"           
## [15] "MonthlyIncome"            "NumCompaniesWorked"      
## [17] "OverTime"                 "PercentSalaryHike"       
## [19] "RelationshipSatisfaction" "StockOptionLevel"        
## [21] "TotalWorkingYears"        "TrainingTimesLastYear"   
## [23] "WorkLifeBalance"          "YearsAtCompany"          
## [25] "YearsInCurrentRole"       "YearsSinceLastPromotion" 
## [27] "YearsWithCurrManager"

Plot histogram for analyzing Attrition

  • We have plotted the histogram of Attrition to know about the Attrition in this data. We found that 730 employees says No for Attrition in this data and 140 employees says yes to Attrition in this data..
ggplot(case2,aes(x=Attrition,fill=Attrition))+geom_bar()+
  geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))

Check the missing values and handling the missing values.

  • We checked for missing values in the data and no missing values were found.
  • We converted the character variables into integer.
  • We then created a correlation plot to see the correlation between variables
# Check for missing values
table(is.na(case2))
## 
## FALSE 
## 23490
# Check for the total number of columns that are character and numeric in type
numeric_var_case2=sum(sapply(case2[,1:27],is.numeric))
numeric_var_case2
## [1] 19
char_var_case2=sum(sapply(case2[,1:27],is.character))
char_var_case2
## [1] 8
# Check for the names of  columns that are character and numeric in type
numeric_varname_case2=which(sapply(case2[,1:27],is.numeric))
numeric_varname_case2
##                      Age         DistanceFromHome                Education 
##                        1                        5                        6 
##  EnvironmentSatisfaction           JobInvolvement                 JobLevel 
##                        8                       10                       11 
##          JobSatisfaction            MonthlyIncome       NumCompaniesWorked 
##                       13                       15                       16 
##        PercentSalaryHike RelationshipSatisfaction         StockOptionLevel 
##                       18                       19                       20 
##        TotalWorkingYears    TrainingTimesLastYear          WorkLifeBalance 
##                       21                       22                       23 
##           YearsAtCompany       YearsInCurrentRole  YearsSinceLastPromotion 
##                       24                       25                       26 
##     YearsWithCurrManager 
##                       27
char_varname_case2=which(sapply(case2[,1:27],is.character))
char_varname_case2
##      Attrition BusinessTravel     Department EducationField         Gender 
##              2              3              4              7              9 
##        JobRole  MaritalStatus       OverTime 
##             12             14             17
case2_numeric=case2
var_facs <- c("Attrition","EducationField","MaritalStatus","BusinessTravel","JobRole", "Department", "OverTime", "Gender")
case2_numeric[,var_facs] <- lapply(case2[,var_facs] , factor, ordered = FALSE)

case2_numeric$JobRole <- as.integer(case2_numeric$JobRole)
case2_numeric$Department <- as.integer(case2_numeric$Department)
case2_numeric$MaritalStatus <- as.integer(case2_numeric$MaritalStatus)
case2_numeric$BusinessTravel <- as.integer(case2_numeric$BusinessTravel)
case2_numeric$Education <- as.integer(case2_numeric$Education)
case2_numeric$Attrition <- as.integer(case2_numeric$Attrition)
case2_numeric$OverTime <- as.integer(case2_numeric$OverTime)
case2_numeric$Gender <- as.integer(case2_numeric$Gender)
case2_numeric$EducationField <- as.integer(case2_numeric$EducationField)

str(case2_numeric)
## 'data.frame':    870 obs. of  27 variables:
##  $ Age                     : int  32 40 35 32 24 27 41 37 34 34 ...
##  $ Attrition               : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ BusinessTravel          : int  3 3 2 3 2 2 3 3 3 2 ...
##  $ Department              : int  3 2 2 3 2 2 2 3 3 2 ...
##  $ DistanceFromHome        : int  13 14 18 1 2 10 5 10 10 10 ...
##  $ Education               : int  4 3 2 4 1 2 5 4 4 4 ...
##  $ EducationField          : int  2 4 2 3 6 2 4 2 2 6 ...
##  $ EnvironmentSatisfaction : int  2 3 3 3 1 4 2 4 3 4 ...
##  $ Gender                  : int  2 2 2 1 1 2 2 1 1 2 ...
##  $ JobInvolvement          : int  3 2 3 3 3 3 4 2 3 2 ...
##  $ JobLevel                : int  2 5 3 3 1 3 1 2 1 2 ...
##  $ JobRole                 : int  8 6 5 8 7 5 7 8 9 1 ...
##  $ JobSatisfaction         : int  4 3 4 4 4 1 3 4 3 3 ...
##  $ MaritalStatus           : int  1 3 3 2 3 1 2 1 2 2 ...
##  $ MonthlyIncome           : int  4403 19626 9362 10422 3760 8793 2127 6694 2220 5063 ...
##  $ NumCompaniesWorked      : int  2 1 2 1 1 1 2 2 1 1 ...
##  $ OverTime                : int  1 1 1 1 2 1 2 2 2 1 ...
##  $ PercentSalaryHike       : int  11 14 11 19 13 21 12 14 19 14 ...
##  $ RelationshipSatisfaction: int  3 1 3 3 3 3 1 3 4 2 ...
##  $ StockOptionLevel        : int  1 0 0 2 0 2 0 3 1 1 ...
##  $ TotalWorkingYears       : int  8 21 10 14 6 9 7 8 1 8 ...
##  $ TrainingTimesLastYear   : int  3 2 2 3 2 4 5 5 2 3 ...
##  $ WorkLifeBalance         : int  2 4 3 3 3 2 2 3 3 2 ...
##  $ YearsAtCompany          : int  5 20 2 14 6 9 4 1 1 8 ...
##  $ YearsInCurrentRole      : int  2 7 2 10 3 7 2 0 1 2 ...
##  $ YearsSinceLastPromotion : int  0 4 2 5 1 1 0 0 0 7 ...
##  $ YearsWithCurrManager    : int  3 9 2 7 3 7 3 0 0 7 ...

Categorize the Monthly Income in “Under 2500, 2500-5000, 5000-7500, Above 7500”

  • We decided to categorize the monthly income in 4 parts and create new column in the data:

  • Under 2500 dollars

  • 2500 to 5000 dollars

  • 5000 to 7500 dollars

  • Above 7500 dollars

  • After creating new column we have 28 variables and 870 entries.

summary(case2_numeric$MonthlyIncome)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    1081    2840    4946    6390    8182   19999
case2_numeric$MonthlyIncome.categorize=cut(case2_numeric$MonthlyIncome, 
    breaks = c(0,2500,5000,7500,999999), 
    labels = c("Under_2500","2500-5000","5000-7500","Above_7500") 
    )  

dim(case2_numeric)
## [1] 870  28
case2$MonthlyIncome.categorize=case2_numeric$MonthlyIncome.categorize
colnames(case2)
##  [1] "Age"                      "Attrition"               
##  [3] "BusinessTravel"           "Department"              
##  [5] "DistanceFromHome"         "Education"               
##  [7] "EducationField"           "EnvironmentSatisfaction" 
##  [9] "Gender"                   "JobInvolvement"          
## [11] "JobLevel"                 "JobRole"                 
## [13] "JobSatisfaction"          "MaritalStatus"           
## [15] "MonthlyIncome"            "NumCompaniesWorked"      
## [17] "OverTime"                 "PercentSalaryHike"       
## [19] "RelationshipSatisfaction" "StockOptionLevel"        
## [21] "TotalWorkingYears"        "TrainingTimesLastYear"   
## [23] "WorkLifeBalance"          "YearsAtCompany"          
## [25] "YearsInCurrentRole"       "YearsSinceLastPromotion" 
## [27] "YearsWithCurrManager"     "MonthlyIncome.categorize"

Exploratory Data Analysis

Plot for Monthly Income by Total Working Years

We decided to categorize the total number of working years in the company:

  • Less than 5 Yrs for 0 to <5 years
  • Less than 15 Yrs for 0 to <15 years
  • Less than 30 Yrs for 0 to <30 years
  • Less than 40 Yrs for 0 to <40 years
unique(case2$TotalWorkingYears)
##  [1]  8 21 10 14  6  9  7  1  3 17 13 12 26 15  5 28 16 36 37 24  0 32 11 27 23
## [26] 18 30 20 22  4 35  2 25 33 29 19 34 31 40
max(case2$TotalWorkingYears)
## [1] 40
min(case2$TotalWorkingYears)
## [1] 0
median(case2$TotalWorkingYears)
## [1] 10
table(is.na(case2$TotalWorkingYears))
## 
## FALSE 
##   870
cut(case2$TotalWorkingYears, 
        breaks = c(-1,5,15,30,100), 
  labels = c("Less than 5 Yrs","Less than 15 Yrs","Less than 30 Yrs","Less than 40 Yrs") 
 ) -> case2$WorkingYears

summary(case2$WorkingYears)
##  Less than 5 Yrs Less than 15 Yrs Less than 30 Yrs Less than 40 Yrs 
##              186              489              170               25
table(is.na(case2$WorkingYears))
## 
## FALSE 
##   870
ggplot(case2,aes(x=TotalWorkingYears,y=MonthlyIncome,col=TotalWorkingYears))+geom_point()+
  geom_smooth(method="lm")
## `geom_smooth()` using formula 'y ~ x'

model1=lm(MonthlyIncome~TotalWorkingYears,data=case2)
summary(model1)
## 
## Call:
## lm(formula = MonthlyIncome ~ TotalWorkingYears, data = case2)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9868.1 -1703.7   -44.5  1453.1 11009.7 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        1124.90     174.19   6.458 1.77e-10 ***
## TotalWorkingYears   476.38      13.04  36.544  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2887 on 868 degrees of freedom
## Multiple R-squared:  0.6061, Adjusted R-squared:  0.6056 
## F-statistic:  1335 on 1 and 868 DF,  p-value: < 2.2e-16

Coorelation plot for numeric variables

We can see the highest correlation that exists for MonthlyIncome very much align to common sense:

  • MonthlyIncome & JobLevel = 0.95
  • MonthlyIncome & TotalWorkingYears = 0.78
  • MonthlyIncome & YearsAtCompany = 0.49
  • MonthlyIncome & YearsInCurrentRole = 0.36
corrplot(cor(case2_numeric[,numeric_varname_case2]), order = "alphabet",method="number",
         col = brewer.pal(n = 8, name = "RdBu"))

Plot some of the numeric variables against MonthlyIncome

We observe the following:

  • Evidence of a strong relationship with JobLevel
  • Evidence of a moderate relationship with TotalWorkingYears
  • Evidence of a moderate relationship with YearsAtCompany
  • Evidence of a moderate relationship with YearsInCurrentRole
ggplot(case2,aes(x=JobLevel,y=MonthlyIncome,col=JobLevel))+geom_point()+
  geom_smooth(method="lm")
## `geom_smooth()` using formula 'y ~ x'

ggplot(case2,aes(x=TotalWorkingYears,y=MonthlyIncome,col=TotalWorkingYears))+geom_point()+
  geom_smooth(method="lm")
## `geom_smooth()` using formula 'y ~ x'

ggplot(case2,aes(x=YearsAtCompany,y=MonthlyIncome,col=YearsAtCompany))+geom_point()+
  geom_smooth(method="lm")
## `geom_smooth()` using formula 'y ~ x'

ggplot(case2,aes(x=YearsInCurrentRole,y=MonthlyIncome,col=YearsInCurrentRole))+geom_point()+
  geom_smooth(method="lm")
## `geom_smooth()` using formula 'y ~ x'

Plot for checking normality for Monthly Income and Attrition

We split the income values into separate vectors and run some exploratory analysis on them. We see that there are about 5 times as many employees who stay vs those who leave. It also appears the mean MonthlyIncome for employees who leave is somewhat lower:

  • $4764.79 for employees who leave
  • $6702 for those that stay

There is also greater variance in between the two groups as well: * The “Yes” group having a standard deviation of $3786.389 * The “No” group having a standard deviation of $4675.472

attrition.No.monthlyIncome=case2%>%dplyr::select(Attrition,MonthlyIncome)%>%filter(Attrition=="No")
dim(attrition.No.monthlyIncome)
## [1] 730   2
attrition.No.monthlyIncome%>%summarise(Mean=mean(attrition.No.monthlyIncome$MonthlyIncome),
                                       Median=median(attrition.No.monthlyIncome$MonthlyIncome),
                                       Standard.Deviation=sd(attrition.No.monthlyIncome$MonthlyIncome),
                                       IQR=IQR(attrition.No.monthlyIncome$MonthlyIncome))
##   Mean Median Standard.Deviation    IQR
## 1 6702 5208.5           4675.472 5574.5
attrition.Yes.monthlyIncome=case2%>%dplyr::select(Attrition,MonthlyIncome)%>%filter(Attrition=="Yes")
dim(attrition.Yes.monthlyIncome)
## [1] 140   2
attrition.Yes.monthlyIncome%>%summarise(Mean=mean(attrition.Yes.monthlyIncome$MonthlyIncome),
                                       Median=median(attrition.Yes.monthlyIncome$MonthlyIncome),
                                      Standard.Deviation=sd(attrition.Yes.monthlyIncome$MonthlyIncome),
                                       IQR=IQR(attrition.Yes.monthlyIncome$MonthlyIncome))
##       Mean Median Standard.Deviation     IQR
## 1 4764.786   3171           3786.389 3497.25

Checking assumptions for Attrition and MonthlyIncome and doing T-test

  • Visually looking at the histogram and qqplot, it seems like the Attrition data has some right skewness.

  • Visually looking at the histogram and qqplot, it seems like the Attrition data has some right skewness.

  • Because both distributions differ significantly from normality we log transform them in order to do a t-test and see if there is evidence that the distributions differ significantly from each other.

  • The QQ Plot of the log transformed MonthlyIncome for each group shows much better adherence to normality, and brings the variance of each group much closer together.

  • The T-test itself shows there is a significant difference between the Monthly Incomes of “Yes” vs “No” attrition groups, p-value < 0.0001. This is strong evidence that MonthlyIncome has an effect on Attrition

ggplot(attrition.No.monthlyIncome,aes(x=MonthlyIncome))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qqnorm(attrition.No.monthlyIncome$MonthlyIncome)

ggplot(attrition.No.monthlyIncome,aes(x=log(MonthlyIncome)))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qqnorm(log(attrition.No.monthlyIncome$MonthlyIncome))

ggplot(attrition.Yes.monthlyIncome,aes(x=log(MonthlyIncome)))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qqnorm(attrition.Yes.monthlyIncome$MonthlyIncome)

ggplot(attrition.Yes.monthlyIncome,aes(x=MonthlyIncome))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qqnorm(log(attrition.Yes.monthlyIncome$MonthlyIncome))

t.test(log(attrition.Yes.monthlyIncome$MonthlyIncome), log(attrition.No.monthlyIncome$MonthlyIncome), var.equal = F) 
## 
##  Welch Two Sample t-test
## 
## data:  log(attrition.Yes.monthlyIncome$MonthlyIncome) and log(attrition.No.monthlyIncome$MonthlyIncome)
## t = -5.9593, df = 195.72, p-value = 1.16e-08
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.4756331 -0.2391013
## sample estimates:
## mean of x mean of y 
##  8.237820  8.595187

Model for MonthlyIncome

Removing the self-generated variables and Attrition from the dataframe and creating the model for Monthly income

We will create a random forest model for looking at the top influential variables among the 26 variables which leads to higher Monthly Income after removing the self-generated variables and Attrition.

Salary

Top 5 most influential were:

  • JobLevel
  • TotalWorkingYears
  • JobRole
  • Age
  • YearsAtCompany
dim(case2)
## [1] 870  29
colnames(case2)
##  [1] "Age"                      "Attrition"               
##  [3] "BusinessTravel"           "Department"              
##  [5] "DistanceFromHome"         "Education"               
##  [7] "EducationField"           "EnvironmentSatisfaction" 
##  [9] "Gender"                   "JobInvolvement"          
## [11] "JobLevel"                 "JobRole"                 
## [13] "JobSatisfaction"          "MaritalStatus"           
## [15] "MonthlyIncome"            "NumCompaniesWorked"      
## [17] "OverTime"                 "PercentSalaryHike"       
## [19] "RelationshipSatisfaction" "StockOptionLevel"        
## [21] "TotalWorkingYears"        "TrainingTimesLastYear"   
## [23] "WorkLifeBalance"          "YearsAtCompany"          
## [25] "YearsInCurrentRole"       "YearsSinceLastPromotion" 
## [27] "YearsWithCurrManager"     "MonthlyIncome.categorize"
## [29] "WorkingYears"
case2[,-c(2,28,29,30,31)] -> case2_salary
case2_salary_features <- randomForest(MonthlyIncome ~., 
                                     data = case2_salary, 
 importance = TRUE)
colnames(case2_salary)                                    
##  [1] "Age"                      "BusinessTravel"          
##  [3] "Department"               "DistanceFromHome"        
##  [5] "Education"                "EducationField"          
##  [7] "EnvironmentSatisfaction"  "Gender"                  
##  [9] "JobInvolvement"           "JobLevel"                
## [11] "JobRole"                  "JobSatisfaction"         
## [13] "MaritalStatus"            "MonthlyIncome"           
## [15] "NumCompaniesWorked"       "OverTime"                
## [17] "PercentSalaryHike"        "RelationshipSatisfaction"
## [19] "StockOptionLevel"         "TotalWorkingYears"       
## [21] "TrainingTimesLastYear"    "WorkLifeBalance"         
## [23] "YearsAtCompany"           "YearsInCurrentRole"      
## [25] "YearsSinceLastPromotion"  "YearsWithCurrManager"
varImpPlot(case2_salary_features)

importance(case2_salary_features)
##                              %IncMSE IncNodePurity
## Age                      10.39971726     924436679
## BusinessTravel            1.59104968      43569618
## Department                5.44201829      92819527
## DistanceFromHome          0.63790156     135505740
## Education                 1.82920562      96111367
## EducationField           -0.13127064      60824061
## EnvironmentSatisfaction   1.88611713      67504060
## Gender                   -2.00632656      23235443
## JobInvolvement            0.09758909      45521430
## JobLevel                 55.77773800    9526873450
## JobRole                  15.70022080     851104585
## JobSatisfaction           0.84733763      59055506
## MaritalStatus             0.21971174      37775031
## NumCompaniesWorked        5.80749870     174009055
## OverTime                 -0.29818574      20821146
## PercentSalaryHike        -0.87121265     102946156
## RelationshipSatisfaction  0.05392068      55862720
## StockOptionLevel         -0.03640824      36545760
## TotalWorkingYears        21.33800027    4311404206
## TrainingTimesLastYear    -0.68167056      74607404
## WorkLifeBalance          -0.66003614      39869925
## YearsAtCompany            9.15230404     788074872
## YearsInCurrentRole        6.57268296     301163443
## YearsSinceLastPromotion   2.17051362     145517050
## YearsWithCurrManager      3.83144018     242908291

Looking at Top 5 infuential variables correlation with MonthlyIncome

Looking at the correlation plot for the top 5 influential factors that leads to higher monthly income.

  • MonthlyIncome & JobLevel = 0.95(strong relationship)
  • MonthlyIncome & TotalWorkingYears = 0.78(Moderate relationship)
  • MonthlyIncome & JobRole = -0.08(Moderate relationship)
  • MonthlyIncome & YearsAtCompany = 0.49(Moderate relationship)
  • MonthlyIncome & Age = 0.48(Moderate relationship)
income.totalYears=data.frame(TotalWorkingYears=case2$TotalWorkingYears,MonthlyIncome=case2$MonthlyIncome,
                             JobRole=case2_numeric$JobRole,JobLevel=case2$JobLevel,
                             Age=case2$Age,YearsAtCompany=case2$YearsAtCompany)
dim(income.totalYears)
## [1] 870   6
corrplot(cor(income.totalYears), order = "alphabet",
         col = brewer.pal(n = 8, name = "RdBu"),method="number")

PLot for Job Level by Monthly Income

We have plotted the bar graph to see the monthly income of employees based on their job level in the company.

  • Visually looking at the graph it seems like the all employees at Job Level=1 have the earning less than 5000.
  • Approximately 97.24% of the employees having income under 2500 are at Job Level=1
  • Only 15.67% of the employees earning above 7500 are at Job Level=5. No employees at job level=5 are earning below 7500.
ggplot(case2,aes(x=JobLevel,fill=MonthlyIncome.categorize))+geom_bar(position="stack",stat="count")+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+facet_grid(row=vars(MonthlyIncome.categorize))

colnames(case2)
##  [1] "Age"                      "Attrition"               
##  [3] "BusinessTravel"           "Department"              
##  [5] "DistanceFromHome"         "Education"               
##  [7] "EducationField"           "EnvironmentSatisfaction" 
##  [9] "Gender"                   "JobInvolvement"          
## [11] "JobLevel"                 "JobRole"                 
## [13] "JobSatisfaction"          "MaritalStatus"           
## [15] "MonthlyIncome"            "NumCompaniesWorked"      
## [17] "OverTime"                 "PercentSalaryHike"       
## [19] "RelationshipSatisfaction" "StockOptionLevel"        
## [21] "TotalWorkingYears"        "TrainingTimesLastYear"   
## [23] "WorkLifeBalance"          "YearsAtCompany"          
## [25] "YearsInCurrentRole"       "YearsSinceLastPromotion" 
## [27] "YearsWithCurrManager"     "MonthlyIncome.categorize"
## [29] "WorkingYears"

Plot for Monthly Income by Total Working Years

We have plotted the bar graph to see the monthly income of employees based on their total working years in the company.

  • We found that only 10.59% of the employees earning above 7500 are working in the company for more than 30 years. None of the employees working for more than 30 years have income less than 7500.
  • We also found that none of the employees are earning above 5000 who have been working less than 5 years in the company.
ggplot(case2,aes(fill=MonthlyIncome.categorize,x=WorkingYears))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  facet_grid(row=vars(MonthlyIncome.categorize))+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))

Plot for Monthly Income by Job Role

We have plotted the bar graph to see the Monthly income of employees based on their job role in the company.

We found that only 27.12% of the 870 employees are earning above 7500. We also found that every Research Director and Managers in the company have the highest pay which is over 7500. We see that no sales representative earn over 90k, in which 98.11% earn below 60k and only 1.89% employees earn 5000 to 7500. No healthcare representative anf Manufacturing director and Research Scientist earn below 2500.

ggplot(case2,aes(fill=MonthlyIncome.categorize,x=JobRole))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
 facet_grid(row=vars(MonthlyIncome.categorize))+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))

Plot for Years At Company by MonthlyIncome

Visually looking at the graph it seems like the employees working at the company being less than equal to 5 year are more likely to earn below 2500.

Approximately 27.19% of the employees working at the company for less than 5 years are likely to earn below 2500.

Only 3.38% of the employees earning above 7500 are working at the company for more than 30 years.

case2$CompanyYears=cut(case2$YearsAtCompany, 
        breaks = c(-1,5,15,30,100), 
  labels = c("Less than 5 Yrs","Less than 15 Yrs","Less than 30 Yrs","Less than 40 Yrs") 
 ) 
ggplot(case2,aes(fill=MonthlyIncome.categorize,x=CompanyYears))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle=90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+
facet_grid(row=vars(MonthlyIncome.categorize))

Plot for Age by Monthly Income

Only 7.65% of the employees having 19 to 30 years age earn above 7500 and approximately 31.53% of the employees earn below 2500.

We found that 57.33% of the employees having age 50 to 60 years are earning above 7500.

case2$AgeEmp=cut(case2$Age, 
        breaks = c(17,30,40,50,60,100), 
  labels = c("19 to 30 years"," 30 to 40 years","40 to 50 years","50 to 60 years","Above 60 years") 
 ) 
ggplot(case2,aes(fill=MonthlyIncome.categorize,x=AgeEmp))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle=90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+
facet_grid(row=vars(MonthlyIncome.categorize))

colnames(case2)
##  [1] "Age"                      "Attrition"               
##  [3] "BusinessTravel"           "Department"              
##  [5] "DistanceFromHome"         "Education"               
##  [7] "EducationField"           "EnvironmentSatisfaction" 
##  [9] "Gender"                   "JobInvolvement"          
## [11] "JobLevel"                 "JobRole"                 
## [13] "JobSatisfaction"          "MaritalStatus"           
## [15] "MonthlyIncome"            "NumCompaniesWorked"      
## [17] "OverTime"                 "PercentSalaryHike"       
## [19] "RelationshipSatisfaction" "StockOptionLevel"        
## [21] "TotalWorkingYears"        "TrainingTimesLastYear"   
## [23] "WorkLifeBalance"          "YearsAtCompany"          
## [25] "YearsInCurrentRole"       "YearsSinceLastPromotion" 
## [27] "YearsWithCurrManager"     "MonthlyIncome.categorize"
## [29] "WorkingYears"             "CompanyYears"            
## [31] "AgeEmp"

Building a linear regression model for Monthly income vs all variables

  • By building the linear regression model we found the following:

  • R-squared=0.9491; that means the the model is capable of explaining that 94.91% of the monthly income is associated with all the factors given in the data.

Then looking at the variation inflation factor, we see that the department and job role variables are having VIF higher than 10, so in the next step we will remove these two variables.

case2_salary -> case2_salary_reg
# First create model on all variables
lm(MonthlyIncome ~ ., data =  case2_salary_reg) -> case2_salary_lm
summary(case2_salary_lm)
## 
## Call:
## lm(formula = MonthlyIncome ~ ., data = case2_salary_reg)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3737.2  -656.2   -33.6   589.1  4136.7 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                      -606.140    668.262  -0.907 0.364649    
## Age                                -1.639      5.654  -0.290 0.771955    
## BusinessTravelTravel_Frequently   182.855    141.863   1.289 0.197775    
## BusinessTravelTravel_Rarely       369.777    120.413   3.071 0.002204 ** 
## DepartmentResearch & Development  114.497    478.229   0.239 0.810839    
## DepartmentSales                  -430.542    489.251  -0.880 0.379113    
## DistanceFromHome                   -6.311      4.559  -1.384 0.166647    
## Education                         -30.058     37.243  -0.807 0.419856    
## EducationFieldLife Sciences       131.421    369.673   0.356 0.722301    
## EducationFieldMarketing           106.003    391.782   0.271 0.786792    
## EducationFieldMedical              26.071    370.560   0.070 0.943927    
## EducationFieldOther                84.344    395.567   0.213 0.831205    
## EducationFieldTechnical Degree     87.267    385.419   0.226 0.820930    
## EnvironmentSatisfaction           -10.055     33.561  -0.300 0.764551    
## GenderMale                        119.237     74.663   1.597 0.110648    
## JobInvolvement                     17.245     52.444   0.329 0.742365    
## JobLevel                         2798.801     83.435  33.544  < 2e-16 ***
## JobRoleHuman Resources           -191.727    516.673  -0.371 0.710673    
## JobRoleLaboratory Technician     -603.937    171.759  -3.516 0.000462 ***
## JobRoleManager                   4199.953    282.586  14.863  < 2e-16 ***
## JobRoleManufacturing Director     153.533    170.023   0.903 0.366782    
## JobRoleResearch Director         4012.539    219.451  18.284  < 2e-16 ***
## JobRoleResearch Scientist        -331.361    170.699  -1.941 0.052572 .  
## JobRoleSales Executive            487.672    358.943   1.359 0.174632    
## JobRoleSales Representative       109.404    392.699   0.279 0.780625    
## JobSatisfaction                    23.515     32.974   0.713 0.475958    
## MaritalStatusMarried               70.239    100.024   0.702 0.482740    
## MaritalStatusSingle                16.787    134.568   0.125 0.900753    
## NumCompaniesWorked                  8.757     16.798   0.521 0.602279    
## OverTimeYes                         7.519     81.140   0.093 0.926191    
## PercentSalaryHike                   1.193      9.961   0.120 0.904732    
## RelationshipSatisfaction           16.304     33.297   0.490 0.624510    
## StockOptionLevel                    6.157     56.901   0.108 0.913859    
## TotalWorkingYears                  49.926     10.999   4.539 6.48e-06 ***
## TrainingTimesLastYear              23.730     29.182   0.813 0.416350    
## WorkLifeBalance                   -43.459     51.593  -0.842 0.399844    
## YearsAtCompany                     -2.131     13.620  -0.156 0.875706    
## YearsInCurrentRole                  3.479     17.006   0.205 0.837942    
## YearsSinceLastPromotion            29.344     15.258   1.923 0.054804 .  
## YearsWithCurrManager              -26.775     16.731  -1.600 0.109901    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1061 on 830 degrees of freedom
## Multiple R-squared:  0.9491, Adjusted R-squared:  0.9468 
## F-statistic: 397.2 on 39 and 830 DF,  p-value: < 2.2e-16
# Then test for VIF
vif(case2_salary_lm)
##                                GVIF Df GVIF^(1/(2*Df))
## Age                        1.966832  1        1.402438
## BusinessTravel             1.110032  2        1.026441
## Department               110.874985  2        3.244953
## DistanceFromHome           1.062561  1        1.030806
## Education                  1.120870  1        1.058711
## EducationField             2.898610  5        1.112292
## EnvironmentSatisfaction    1.051126  1        1.025244
## Gender                     1.039965  1        1.019787
## JobInvolvement             1.051408  1        1.025382
## JobLevel                   6.387536  1        2.527358
## JobRole                  494.745698  8        1.473665
## JobSatisfaction            1.042825  1        1.021188
## MaritalStatus              1.984091  2        1.186835
## NumCompaniesWorked         1.384089  1        1.176473
## OverTime                   1.047147  1        1.023302
## PercentSalaryHike          1.034879  1        1.017290
## RelationshipSatisfaction   1.040543  1        1.020070
## StockOptionLevel           1.839351  1        1.356227
## TotalWorkingYears          5.273175  1        2.296339
## TrainingTimesLastYear      1.064991  1        1.031984
## WorkLifeBalance            1.041859  1        1.020715
## YearsAtCompany             5.192457  1        2.278696
## YearsInCurrentRole         2.957481  1        1.719733
## YearsSinceLastPromotion    1.824576  1        1.350768
## YearsWithCurrManager       2.761474  1        1.661768

Removing the department and job role variables and then looking the performace of the model

By building the other linear regression model after removing the variables with high VIF, we found the following:

  • R-squared=0.9142; that means the the model is capable of explaining that 91.42% of the monthly income is associated with all the factors given in the data.

Then again looking at the variation inflation factor, we see that the total working years and years at company variables are having VIF higher than 5, so in the next step we will remove these two variables.

case2_salary_reg[,-c(3,11)] -> case2_salary_reg.df
# create model on remaining variables
lm(MonthlyIncome ~ ., data =  case2_salary_reg.df) -> case2_salary_lm
summary(case2_salary_lm)
## 
## Call:
## lm(formula = MonthlyIncome ~ ., data = case2_salary_reg.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5887.4  -773.2    -5.9   737.8  4298.4 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     -1782.451    620.768  -2.871  0.00419 ** 
## Age                                -2.495      7.248  -0.344  0.73078    
## BusinessTravelTravel_Frequently    10.519    181.412   0.058  0.95378    
## BusinessTravelTravel_Rarely       320.016    154.308   2.074  0.03840 *  
## DistanceFromHome                  -15.799      5.852  -2.700  0.00707 ** 
## Education                          15.477     47.543   0.326  0.74486    
## EducationFieldLife Sciences      -309.505    364.944  -0.848  0.39663    
## EducationFieldMarketing          -672.812    383.954  -1.752  0.08008 .  
## EducationFieldMedical            -270.299    367.359  -0.736  0.46206    
## EducationFieldOther              -387.162    405.311  -0.955  0.33974    
## EducationFieldTechnical Degree   -312.110    391.375  -0.797  0.42540    
## EnvironmentSatisfaction           -64.796     42.881  -1.511  0.13115    
## GenderMale                         76.079     95.943   0.793  0.42803    
## JobInvolvement                     91.904     67.057   1.371  0.17089    
## JobLevel                         3747.315     69.837  53.658  < 2e-16 ***
## JobSatisfaction                    -1.963     42.486  -0.046  0.96316    
## MaritalStatusMarried              149.809    128.232   1.168  0.24303    
## MaritalStatusSingle                -9.188    172.030  -0.053  0.95742    
## NumCompaniesWorked                -11.593     21.527  -0.539  0.59034    
## OverTimeYes                        27.770    103.798   0.268  0.78912    
## PercentSalaryHike                   9.278     12.808   0.724  0.46902    
## RelationshipSatisfaction           24.974     42.911   0.582  0.56073    
## StockOptionLevel                  -11.084     73.068  -0.152  0.87946    
## TotalWorkingYears                  70.850     13.887   5.102 4.16e-07 ***
## TrainingTimesLastYear              22.175     37.356   0.594  0.55294    
## WorkLifeBalance                   -28.164     66.264  -0.425  0.67093    
## YearsAtCompany                    -10.388     17.366  -0.598  0.54989    
## YearsInCurrentRole                -11.438     21.680  -0.528  0.59791    
## YearsSinceLastPromotion             7.041     19.534   0.360  0.71862    
## YearsWithCurrManager              -44.929     21.373  -2.102  0.03584 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1370 on 840 degrees of freedom
## Multiple R-squared:  0.9142, Adjusted R-squared:  0.9112 
## F-statistic: 308.5 on 29 and 840 DF,  p-value: < 2.2e-16
# Then test for VIF
vif(case2_salary_lm)
##                              GVIF Df GVIF^(1/(2*Df))
## Age                      1.937665  1        1.392000
## BusinessTravel           1.071643  2        1.017449
## DistanceFromHome         1.049644  1        1.024522
## Education                1.095339  1        1.046584
## EducationField           1.157371  5        1.014722
## EnvironmentSatisfaction  1.028985  1        1.014389
## Gender                   1.029746  1        1.014764
## JobInvolvement           1.030792  1        1.015279
## JobLevel                 2.683566  1        1.638159
## JobSatisfaction          1.038164  1        1.018903
## MaritalStatus            1.931779  2        1.178934
## NumCompaniesWorked       1.363027  1        1.167488
## OverTime                 1.027599  1        1.013705
## PercentSalaryHike        1.026095  1        1.012964
## RelationshipSatisfaction 1.036300  1        1.017988
## StockOptionLevel         1.818774  1        1.348619
## TotalWorkingYears        5.040957  1        2.245208
## TrainingTimesLastYear    1.046526  1        1.022999
## WorkLifeBalance          1.030572  1        1.015171
## YearsAtCompany           5.062406  1        2.249979
## YearsInCurrentRole       2.882311  1        1.697737
## YearsSinceLastPromotion  1.793276  1        1.339133
## YearsWithCurrManager     2.702426  1        1.643906

Removing the total working years and years at company variables and then looking the performace of the model

Even after removing the variables having variables with VIF higher than 5, the model is performing good.

  • By building the other linear regression model after removing the variables with high VIF, we found the following:

  • R-squared=0.9142; that means the the model is capable of explaining that 91.42% of the monthly income is associated with all the factors given in the data.

case2_salary_reg.df[,-c(17,20)] -> case2_salary_reg.df
# create model on remaining variables
lm(MonthlyIncome ~ ., data =  case2_salary_reg.df) -> case2_salary_lm
summary(case2_salary_lm)
## 
## Call:
## lm(formula = MonthlyIncome ~ ., data = case2_salary_reg.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5899.5  -766.7    -4.8   737.7  4293.3 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     -1874.727    586.219  -3.198  0.00144 ** 
## Age                                -2.356      7.231  -0.326  0.74466    
## BusinessTravelTravel_Frequently     9.868    181.145   0.054  0.95657    
## BusinessTravelTravel_Rarely       321.165    154.100   2.084  0.03745 *  
## DistanceFromHome                  -15.818      5.836  -2.711  0.00685 ** 
## Education                          15.064     47.474   0.317  0.75109    
## EducationFieldLife Sciences      -304.671    364.293  -0.836  0.40320    
## EducationFieldMarketing          -670.452    383.394  -1.749  0.08070 .  
## EducationFieldMedical            -265.549    366.736  -0.724  0.46921    
## EducationFieldOther              -382.144    404.637  -0.944  0.34523    
## EducationFieldTechnical Degree   -309.825    390.918  -0.793  0.42826    
## EnvironmentSatisfaction           -66.308     42.708  -1.553  0.12089    
## GenderMale                         77.232     95.804   0.806  0.42039    
## JobInvolvement                     91.447     66.963   1.366  0.17242    
## JobLevel                         3747.049     69.706  53.755  < 2e-16 ***
## JobSatisfaction                    -1.911     42.405  -0.045  0.96407    
## MaritalStatusMarried              156.815    121.956   1.286  0.19885    
## MaritalStatusSingle                 8.292    132.078   0.063  0.94995    
## NumCompaniesWorked                -12.014     21.469  -0.560  0.57590    
## OverTimeYes                        27.813    103.687   0.268  0.78858    
## PercentSalaryHike                   9.214     12.793   0.720  0.47159    
## RelationshipSatisfaction           24.483     42.841   0.571  0.56782    
## TotalWorkingYears                  70.856     13.871   5.108 4.03e-07 ***
## TrainingTimesLastYear              21.487     37.269   0.577  0.56441    
## YearsAtCompany                    -10.095     17.330  -0.583  0.56037    
## YearsInCurrentRole                -12.475     21.532  -0.579  0.56250    
## YearsSinceLastPromotion             6.959     19.503   0.357  0.72131    
## YearsWithCurrManager              -44.752     21.320  -2.099  0.03611 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1369 on 842 degrees of freedom
## Multiple R-squared:  0.9142, Adjusted R-squared:  0.9114 
## F-statistic: 332.1 on 27 and 842 DF,  p-value: < 2.2e-16
# Then test for VIF
vif(case2_salary_lm)
##                              GVIF Df GVIF^(1/(2*Df))
## Age                      1.932720  1        1.390223
## BusinessTravel           1.069613  2        1.016966
## DistanceFromHome         1.046096  1        1.022788
## Education                1.094511  1        1.046189
## EducationField           1.143749  5        1.013522
## EnvironmentSatisfaction  1.022882  1        1.011376
## Gender                   1.028956  1        1.014374
## JobInvolvement           1.030104  1        1.014941
## JobLevel                 2.679161  1        1.636814
## JobSatisfaction          1.036400  1        1.018037
## MaritalStatus            1.100055  2        1.024126
## NumCompaniesWorked       1.358563  1        1.165574
## OverTime                 1.027584  1        1.013698
## PercentSalaryHike        1.025840  1        1.012838
## RelationshipSatisfaction 1.035095  1        1.017396
## TotalWorkingYears        5.040420  1        2.245088
## TrainingTimesLastYear    1.043864  1        1.021697
## YearsAtCompany           5.051709  1        2.247601
## YearsInCurrentRole       2.849282  1        1.687982
## YearsSinceLastPromotion  1.791245  1        1.338374
## YearsWithCurrManager     2.694799  1        1.641584

Using StepWise Selection for feature selection

Now that we have used multicollinearity to reduce to 22 parameters, we now will run Stepwise Feature Selection to find the 6 most influential variables and compare them to both what the Random Forest found as well as the prior Linear Regression.

Important Factors that all have p-value <= 0.05:

  • BusinessTravel: Travel_Rarely
  • DistanceFromHome
  • EducationField: Marketing
  • JobLevel
  • TotalWorkingYears
  • YearsWithCurrManager

We can see the RMSE of this model is $1369.276

And the Adjusted R-squared is 0.9119, which means an estimated 91.19% of the MonthlyIncome variable can be accounted for by this model.

dim(case2_salary_reg.df)
## [1] 870  22
trainControl(method = "cv", number = 5) -> train.CV

train(MonthlyIncome ~ .,
  data = case2_salary_reg.df,
  method = "lmStepAIC",
  trControl = train.CV
) -> case2.salary.stepwise
## Start:  AIC=10089.07
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Education                         1       1068 1243805583 10087
## - JobSatisfaction                   1       6190 1243810704 10087
## - NumCompaniesWorked                1      54250 1243858765 10087
## - MaritalStatusSingle               1      54668 1243859182 10087
## - EducationFieldMedical             1      87927 1243892442 10087
## - `EducationFieldLife Sciences`     1     113845 1243918359 10087
## - YearsInCurrentRole                1     124710 1243929224 10087
## - YearsSinceLastPromotion           1     151873 1243956388 10087
## - `EducationFieldTechnical Degree`  1     282509 1244087024 10087
## - GenderMale                        1     669324 1244473839 10087
## - BusinessTravelTravel_Frequently   1     703984 1244508498 10088
## - Age                               1     727777 1244532291 10088
## - EducationFieldOther               1    1046728 1244851243 10088
## - PercentSalaryHike                 1    1057729 1244862243 10088
## - OverTimeYes                       1    1340344 1245144858 10088
## - EnvironmentSatisfaction           1    1474167 1245278681 10088
## - YearsWithCurrManager              1    1478252 1245282767 10088
## - MaritalStatusMarried              1    1554944 1245359458 10088
## - JobInvolvement                    1    1980942 1245785457 10088
## - RelationshipSatisfaction          1    2156244 1245960758 10088
## - EducationFieldMarketing           1    2504655 1246309170 10088
## - TrainingTimesLastYear             1    2704397 1246508911 10089
## <none>                                           1243804514 10089
## - YearsAtCompany                    1    6057241 1249861756 10090
## - BusinessTravelTravel_Rarely       1   10460142 1254264656 10093
## - DistanceFromHome                  1   11874810 1255679325 10094
## - TotalWorkingYears                 1   30899059 1274703573 10104
## - JobLevel                          1 4412718127 5656522642 11143
## 
## Step:  AIC=10087.08
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     JobSatisfaction + MaritalStatusMarried + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - JobSatisfaction                   1       6392 1243811975 10085
## - NumCompaniesWorked                1      53197 1243858780 10085
## - MaritalStatusSingle               1      54654 1243860237 10085
## - EducationFieldMedical             1      88115 1243893698 10085
## - `EducationFieldLife Sciences`     1     113903 1243919486 10085
## - YearsInCurrentRole                1     124352 1243929935 10085
## - YearsSinceLastPromotion           1     152626 1243958209 10085
## - `EducationFieldTechnical Degree`  1     282597 1244088179 10085
## - GenderMale                        1     668577 1244474160 10085
## - BusinessTravelTravel_Frequently   1     703224 1244508806 10086
## - Age                               1     735668 1244541250 10086
## - EducationFieldOther               1    1046472 1244852055 10086
## - PercentSalaryHike                 1    1057943 1244863525 10086
## - OverTimeYes                       1    1339992 1245145575 10086
## - EnvironmentSatisfaction           1    1477584 1245283167 10086
## - YearsWithCurrManager              1    1480542 1245286125 10086
## - MaritalStatusMarried              1    1555861 1245361444 10086
## - JobInvolvement                    1    1990897 1245796480 10086
## - RelationshipSatisfaction          1    2155908 1245961491 10086
## - EducationFieldMarketing           1    2503625 1246309207 10086
## - TrainingTimesLastYear             1    2707569 1246513152 10087
## <none>                                           1243805583 10087
## - YearsAtCompany                    1    6057964 1249863546 10088
## - BusinessTravelTravel_Rarely       1   10460477 1254266059 10091
## - DistanceFromHome                  1   11884849 1255690432 10092
## - TotalWorkingYears                 1   30966323 1274771906 10102
## - JobLevel                          1 4416486564 5660292147 11141
## 
## Step:  AIC=10085.08
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusSingle               1      54127 1243866101 10083
## - NumCompaniesWorked                1      56510 1243868484 10083
## - EducationFieldMedical             1      86720 1243898695 10083
## - `EducationFieldLife Sciences`     1     111821 1243923796 10083
## - YearsInCurrentRole                1     122790 1243934765 10083
## - YearsSinceLastPromotion           1     150893 1243962867 10083
## - `EducationFieldTechnical Degree`  1     280871 1244092846 10083
## - GenderMale                        1     670086 1244482060 10084
## - BusinessTravelTravel_Frequently   1     705797 1244517772 10084
## - Age                               1     731796 1244543770 10084
## - EducationFieldOther               1    1042448 1244854422 10084
## - PercentSalaryHike                 1    1056994 1244868968 10084
## - OverTimeYes                       1    1346584 1245158559 10084
## - EnvironmentSatisfaction           1    1483658 1245295633 10084
## - YearsWithCurrManager              1    1484092 1245296066 10084
## - MaritalStatusMarried              1    1554187 1245366162 10084
## - JobInvolvement                    1    1987185 1245799160 10084
## - RelationshipSatisfaction          1    2150101 1245962076 10084
## - EducationFieldMarketing           1    2498878 1246310852 10084
## - TrainingTimesLastYear             1    2702462 1246514436 10085
## <none>                                           1243811975 10085
## - YearsAtCompany                    1    6056247 1249868221 10086
## - BusinessTravelTravel_Rarely       1   10456795 1254268770 10089
## - DistanceFromHome                  1   11891934 1255703909 10090
## - TotalWorkingYears                 1   30978043 1274790017 10100
## - JobLevel                          1 4416649402 5660461376 11139
## 
## Step:  AIC=10083.11
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - NumCompaniesWorked                1      58915 1243925016 10081
## - EducationFieldMedical             1      91794 1243957895 10081
## - `EducationFieldLife Sciences`     1     119671 1243985772 10081
## - YearsInCurrentRole                1     130159 1243996260 10081
## - YearsSinceLastPromotion           1     151920 1244018021 10081
## - `EducationFieldTechnical Degree`  1     291531 1244157632 10081
## - BusinessTravelTravel_Frequently   1     683734 1244549835 10082
## - Age                               1     706675 1244572776 10082
## - GenderMale                        1     727213 1244593314 10082
## - EducationFieldOther               1    1064023 1244930124 10082
## - PercentSalaryHike                 1    1067772 1244933873 10082
## - OverTimeYes                       1    1350735 1245216836 10082
## - EnvironmentSatisfaction           1    1470933 1245337034 10082
## - YearsWithCurrManager              1    1505409 1245371511 10082
## - JobInvolvement                    1    2038196 1245904297 10082
## - RelationshipSatisfaction          1    2125872 1245991973 10082
## - EducationFieldMarketing           1    2533848 1246399949 10082
## - TrainingTimesLastYear             1    2709043 1246575144 10083
## - MaritalStatusMarried              1    3139206 1247005307 10083
## <none>                                           1243866101 10083
## - YearsAtCompany                    1    6050622 1249916723 10084
## - BusinessTravelTravel_Rarely       1   10405622 1254271723 10087
## - DistanceFromHome                  1   11872709 1255738810 10088
## - TotalWorkingYears                 1   30948014 1274814115 10098
## - JobLevel                          1 4422647989 5666514090 11138
## 
## Step:  AIC=10081.14
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + OverTimeYes + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldMedical             1      94211 1244019226 10079
## - `EducationFieldLife Sciences`     1     120987 1244046003 10079
## - YearsInCurrentRole                1     132020 1244057036 10079
## - YearsSinceLastPromotion           1     150785 1244075801 10079
## - `EducationFieldTechnical Degree`  1     297528 1244222544 10079
## - BusinessTravelTravel_Frequently   1     703028 1244628044 10080
## - GenderMale                        1     734737 1244659753 10080
## - Age                               1     740089 1244665105 10080
## - EducationFieldOther               1    1064123 1244989139 10080
## - PercentSalaryHike                 1    1078233 1245003249 10080
## - OverTimeYes                       1    1353238 1245278254 10080
## - EnvironmentSatisfaction           1    1491856 1245416872 10080
## - YearsWithCurrManager              1    1500737 1245425753 10080
## - JobInvolvement                    1    2046766 1245971782 10080
## - RelationshipSatisfaction          1    2089466 1246014482 10080
## - EducationFieldMarketing           1    2528990 1246454006 10081
## - TrainingTimesLastYear             1    2742596 1246667612 10081
## - MaritalStatusMarried              1    3116797 1247041813 10081
## <none>                                           1243925016 10081
## - YearsAtCompany                    1    6121946 1250046962 10083
## - BusinessTravelTravel_Rarely       1   10516008 1254441024 10085
## - DistanceFromHome                  1   11814090 1255739106 10086
## - TotalWorkingYears                 1   33175064 1277100080 10098
## - JobLevel                          1 4449197850 5693122866 11139
## 
## Step:  AIC=10079.2
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + OverTimeYes + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldLife Sciences`     1      33337 1244052563 10077
## - YearsInCurrentRole                1     131783 1244151010 10077
## - YearsSinceLastPromotion           1     140094 1244159321 10077
## - `EducationFieldTechnical Degree`  1     329229 1244348455 10077
## - BusinessTravelTravel_Frequently   1     702462 1244721689 10078
## - GenderMale                        1     743527 1244762754 10078
## - Age                               1     749959 1244769185 10078
## - PercentSalaryHike                 1    1059218 1245078444 10078
## - OverTimeYes                       1    1345902 1245365129 10078
## - EnvironmentSatisfaction           1    1494373 1245513600 10078
## - YearsWithCurrManager              1    1519578 1245538805 10078
## - JobInvolvement                    1    2032982 1246052208 10078
## - RelationshipSatisfaction          1    2125416 1246144643 10078
## - EducationFieldOther               1    2396812 1246416039 10078
## - TrainingTimesLastYear             1    2701516 1246720742 10079
## - MaritalStatusMarried              1    3190827 1247210053 10079
## <none>                                           1244019226 10079
## - YearsAtCompany                    1    6104188 1250123414 10081
## - EducationFieldMarketing           1    9472888 1253492115 10082
## - BusinessTravelTravel_Rarely       1   10472095 1254491321 10083
## - DistanceFromHome                  1   11834127 1255853353 10084
## - TotalWorkingYears                 1   33298591 1277317817 10096
## - JobLevel                          1 4449119119 5693138345 11137
## 
## Step:  AIC=10077.21
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + EducationFieldMarketing + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsInCurrentRole                1     125854 1244178417 10075
## - YearsSinceLastPromotion           1     138135 1244190698 10075
## - `EducationFieldTechnical Degree`  1     295892 1244348455 10075
## - BusinessTravelTravel_Frequently   1     691501 1244744064 10076
## - GenderMale                        1     736762 1244789326 10076
## - Age                               1     770367 1244822931 10076
## - PercentSalaryHike                 1    1071477 1245124040 10076
## - OverTimeYes                       1    1341294 1245393857 10076
## - EnvironmentSatisfaction           1    1491548 1245544111 10076
## - YearsWithCurrManager              1    1539004 1245591567 10076
## - JobInvolvement                    1    2036529 1246089092 10076
## - RelationshipSatisfaction          1    2199800 1246252363 10076
## - EducationFieldOther               1    2461856 1246514419 10077
## - TrainingTimesLastYear             1    2798511 1246851074 10077
## - MaritalStatusMarried              1    3201411 1247253974 10077
## <none>                                           1244052563 10077
## - YearsAtCompany                    1    6073532 1250126095 10079
## - BusinessTravelTravel_Rarely       1   10438759 1254491322 10081
## - EducationFieldMarketing           1   10600438 1254653001 10081
## - DistanceFromHome                  1   11801818 1255854381 10082
## - TotalWorkingYears                 1   33452616 1277505179 10094
## - JobLevel                          1 4449591845 5693644408 11135
## 
## Step:  AIC=10075.28
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + EducationFieldMarketing + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsSinceLastPromotion           1     180091 1244358508 10073
## - `EducationFieldTechnical Degree`  1     281858 1244460275 10073
## - BusinessTravelTravel_Frequently   1     688705 1244867121 10074
## - GenderMale                        1     706475 1244884892 10074
## - Age                               1     793212 1244971628 10074
## - PercentSalaryHike                 1    1110015 1245288431 10074
## - OverTimeYes                       1    1315585 1245494001 10074
## - YearsWithCurrManager              1    1415603 1245594019 10074
## - EnvironmentSatisfaction           1    1455194 1245633611 10074
## - JobInvolvement                    1    2085062 1246263479 10074
## - RelationshipSatisfaction          1    2216655 1246395072 10074
## - EducationFieldOther               1    2440504 1246618920 10075
## - TrainingTimesLastYear             1    2747713 1246926129 10075
## - MaritalStatusMarried              1    3336952 1247515369 10075
## <none>                                           1244178417 10075
## - YearsAtCompany                    1    6566232 1250744648 10077
## - BusinessTravelTravel_Rarely       1   10503494 1254681911 10079
## - EducationFieldMarketing           1   10569869 1254748285 10079
## - DistanceFromHome                  1   11782277 1255960694 10080
## - TotalWorkingYears                 1   33507285 1277685702 10092
## - JobLevel                          1 4449564192 5693742608 11133
## 
## Step:  AIC=10073.39
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + EducationFieldMarketing + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldTechnical Degree`  1     277730 1244636237 10072
## - GenderMale                        1     699991 1245058499 10072
## - BusinessTravelTravel_Frequently   1     700009 1245058517 10072
## - Age                               1     791606 1245150114 10072
## - PercentSalaryHike                 1    1096169 1245454676 10072
## - OverTimeYes                       1    1301712 1245660220 10072
## - YearsWithCurrManager              1    1366040 1245724548 10072
## - EnvironmentSatisfaction           1    1442561 1245801069 10072
## - JobInvolvement                    1    2079136 1246437643 10072
## - RelationshipSatisfaction          1    2306531 1246665039 10073
## - EducationFieldOther               1    2487536 1246846044 10073
## - TrainingTimesLastYear             1    2654945 1247013452 10073
## - MaritalStatusMarried              1    3373485 1247731992 10073
## <none>                                           1244358508 10073
## - YearsAtCompany                    1    6770622 1251129129 10075
## - BusinessTravelTravel_Rarely       1   10417228 1254775736 10077
## - EducationFieldMarketing           1   10493915 1254852423 10077
## - DistanceFromHome                  1   11736814 1256095322 10078
## - TotalWorkingYears                 1   34222566 1278581074 10090
## - JobLevel                          1 4479961039 5724319547 11135
## 
## Step:  AIC=10071.54
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + EducationFieldMarketing + EducationFieldOther + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + OverTimeYes + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsWithCurrManager
## 
##                                   Df  Sum of Sq        RSS   AIC
## - BusinessTravelTravel_Frequently  1     689869 1245326106 10070
## - GenderMale                       1     754194 1245390432 10070
## - Age                              1     755604 1245391841 10070
## - PercentSalaryHike                1    1233199 1245869437 10070
## - OverTimeYes                      1    1355094 1245991331 10070
## - YearsWithCurrManager             1    1418724 1246054961 10070
## - EnvironmentSatisfaction          1    1483656 1246119893 10070
## - JobInvolvement                   1    2083234 1246719472 10071
## - RelationshipSatisfaction         1    2287676 1246923913 10071
## - EducationFieldOther              1    2360410 1246996647 10071
## - TrainingTimesLastYear            1    2591205 1247227442 10071
## - MaritalStatusMarried             1    3311877 1247948114 10071
## <none>                                          1244636237 10072
## - YearsAtCompany                   1    6689037 1251325274 10073
## - EducationFieldMarketing          1   10245292 1254881529 10075
## - BusinessTravelTravel_Rarely      1   10396220 1255032457 10075
## - DistanceFromHome                 1   11682421 1256318659 10076
## - TotalWorkingYears                1   34225733 1278861970 10088
## - JobLevel                         1 4479900157 5724536394 11133
## 
## Step:  AIC=10069.93
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     EducationFieldMarketing + EducationFieldOther + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - GenderMale                   1     684857 1246010964 10068
## - Age                          1     820849 1246146955 10068
## - PercentSalaryHike            1    1192828 1246518935 10069
## - EnvironmentSatisfaction      1    1416365 1246742471 10069
## - OverTimeYes                  1    1500744 1246826851 10069
## - YearsWithCurrManager         1    1514315 1246840421 10069
## - JobInvolvement               1    2184339 1247510446 10069
## - RelationshipSatisfaction     1    2306778 1247632885 10069
## - EducationFieldOther          1    2383342 1247709449 10069
## - TrainingTimesLastYear        1    2629380 1247955487 10069
## - MaritalStatusMarried         1    3252369 1248578475 10070
## <none>                                      1245326106 10070
## - YearsAtCompany               1    6504190 1251830297 10072
## - EducationFieldMarketing      1   10263192 1255589298 10074
## - DistanceFromHome             1   11816525 1257142631 10074
## - BusinessTravelTravel_Rarely  1   15308750 1260634857 10076
## - TotalWorkingYears            1   34653831 1279979938 10087
## - JobLevel                     1 4479335372 5724661478 11131
## 
## Step:  AIC=10068.31
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     EducationFieldMarketing + EducationFieldOther + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + MaritalStatusMarried + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - Age                          1     848162 1246859125 10067
## - PercentSalaryHike            1    1144606 1247155569 10067
## - EnvironmentSatisfaction      1    1392333 1247403297 10067
## - OverTimeYes                  1    1470620 1247481583 10067
## - YearsWithCurrManager         1    1621290 1247632254 10067
## - JobInvolvement               1    2191681 1248202645 10068
## - EducationFieldOther          1    2349751 1248360714 10068
## - RelationshipSatisfaction     1    2397497 1248408461 10068
## - TrainingTimesLastYear        1    2594244 1248605207 10068
## - MaritalStatusMarried         1    3134514 1249145477 10068
## <none>                                      1246010964 10068
## - YearsAtCompany               1    6582019 1252592982 10070
## - EducationFieldMarketing      1   10355343 1256366307 10072
## - DistanceFromHome             1   11834344 1257845308 10073
## - BusinessTravelTravel_Rarely  1   15382320 1261393284 10075
## - TotalWorkingYears            1   34935606 1280946570 10086
## - JobLevel                     1 4481951168 5727962132 11130
## 
## Step:  AIC=10066.78
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + EnvironmentSatisfaction + JobInvolvement + 
##     JobLevel + MaritalStatusMarried + OverTimeYes + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - PercentSalaryHike            1    1185849 1248044975 10065
## - OverTimeYes                  1    1398470 1248257595 10066
## - EnvironmentSatisfaction      1    1404196 1248263322 10066
## - YearsWithCurrManager         1    1496958 1248356084 10066
## - JobInvolvement               1    2113414 1248972539 10066
## - EducationFieldOther          1    2173563 1249032688 10066
## - RelationshipSatisfaction     1    2287732 1249146858 10066
## - TrainingTimesLastYear        1    2615473 1249474598 10066
## - MaritalStatusMarried         1    2906963 1249766089 10066
## <none>                                      1246859125 10067
## - YearsAtCompany               1    6099082 1252958208 10068
## - EducationFieldMarketing      1   10970382 1257829508 10071
## - DistanceFromHome             1   11876404 1258735530 10071
## - BusinessTravelTravel_Rarely  1   15687430 1262546556 10074
## - TotalWorkingYears            1   40791555 1287650681 10087
## - JobLevel                     1 4494502299 5741361425 11129
## 
## Step:  AIC=10065.45
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + EnvironmentSatisfaction + JobInvolvement + 
##     JobLevel + MaritalStatusMarried + OverTimeYes + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - OverTimeYes                  1    1349820 1249394794 10064
## - EnvironmentSatisfaction      1    1365934 1249410909 10064
## - YearsWithCurrManager         1    1471798 1249516773 10064
## - EducationFieldOther          1    2108379 1250153353 10065
## - RelationshipSatisfaction     1    2139935 1250184909 10065
## - JobInvolvement               1    2205698 1250250672 10065
## - TrainingTimesLastYear        1    2571984 1250616959 10065
## - MaritalStatusMarried         1    2867208 1250912183 10065
## <none>                                      1248044975 10065
## - YearsAtCompany               1    6214263 1254259237 10067
## - EducationFieldMarketing      1   11273378 1259318353 10070
## - DistanceFromHome             1   11413936 1259458911 10070
## - BusinessTravelTravel_Rarely  1   15509319 1263554294 10072
## - TotalWorkingYears            1   40558461 1288603435 10086
## - JobLevel                     1 4493323225 5741368200 11127
## 
## Step:  AIC=10064.2
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + EnvironmentSatisfaction + JobInvolvement + 
##     JobLevel + MaritalStatusMarried + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - EnvironmentSatisfaction      1    1252122 1250646916 10063
## - YearsWithCurrManager         1    1665058 1251059852 10063
## - EducationFieldOther          1    1999952 1251394746 10063
## - JobInvolvement               1    2067546 1251462340 10063
## - RelationshipSatisfaction     1    2134104 1251528899 10063
## - TrainingTimesLastYear        1    2425354 1251820148 10064
## - MaritalStatusMarried         1    2708293 1252103087 10064
## <none>                                      1249394794 10064
## - YearsAtCompany               1    5919809 1255314604 10066
## - DistanceFromHome             1   11072067 1260466862 10068
## - EducationFieldMarketing      1   11414158 1260808953 10068
## - BusinessTravelTravel_Rarely  1   15536915 1264931709 10071
## - TotalWorkingYears            1   40229885 1289624679 10084
## - JobLevel                     1 4495154462 5744549257 11126
## 
## Step:  AIC=10062.9
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - YearsWithCurrManager         1    1564401 1252211317 10062
## - JobInvolvement               1    2047483 1252694400 10062
## - RelationshipSatisfaction     1    2097527 1252744443 10062
## - EducationFieldOther          1    2281515 1252928431 10062
## - TrainingTimesLastYear        1    2377740 1253024656 10062
## - MaritalStatusMarried         1    2880939 1253527856 10062
## <none>                                      1250646916 10063
## - YearsAtCompany               1    6051552 1256698468 10064
## - DistanceFromHome             1   10900483 1261547400 10067
## - EducationFieldMarketing      1   11622061 1262268978 10067
## - BusinessTravelTravel_Rarely  1   15614910 1266261827 10070
## - TotalWorkingYears            1   40181879 1290828795 10083
## - JobLevel                     1 4494840425 5745487341 11124
## 
## Step:  AIC=10061.77
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany
## 
##                               Df  Sum of Sq        RSS   AIC
## - JobInvolvement               1    1868433 1254079750 10061
## - RelationshipSatisfaction     1    2269863 1254481180 10061
## - EducationFieldOther          1    2380177 1254591495 10061
## - TrainingTimesLastYear        1    2478864 1254690181 10061
## - MaritalStatusMarried         1    2970527 1255181844 10061
## <none>                                      1252211317 10062
## - DistanceFromHome             1   10840061 1263051378 10066
## - EducationFieldMarketing      1   11922765 1264134082 10066
## - BusinessTravelTravel_Rarely  1   16534370 1268745687 10069
## - YearsAtCompany               1   20979465 1273190782 10071
## - TotalWorkingYears            1   41212665 1293423982 10082
## - JobLevel                     1 4495116072 5747327390 11122
## 
## Step:  AIC=10060.81
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + JobLevel + MaritalStatusMarried + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany
## 
##                               Df  Sum of Sq        RSS   AIC
## - RelationshipSatisfaction     1    2275734 1256355484 10060
## - TrainingTimesLastYear        1    2353597 1256433348 10060
## - EducationFieldOther          1    2593452 1256673202 10060
## - MaritalStatusMarried         1    3026500 1257106250 10060
## <none>                                      1254079750 10061
## - DistanceFromHome             1   10981224 1265060974 10065
## - EducationFieldMarketing      1   12345693 1266425444 10066
## - BusinessTravelTravel_Rarely  1   16923061 1271002812 10068
## - YearsAtCompany               1   21012013 1275091764 10070
## - TotalWorkingYears            1   41623860 1295703610 10082
## - JobLevel                     1 4493582235 5747661985 11120
## 
## Step:  AIC=10060.07
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + JobLevel + MaritalStatusMarried + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany
## 
##                               Df  Sum of Sq        RSS   AIC
## - TrainingTimesLastYear        1    2376349 1258731833 10059
## - EducationFieldOther          1    2625119 1258980603 10060
## - MaritalStatusMarried         1    2689867 1259045351 10060
## <none>                                      1256355484 10060
## - DistanceFromHome             1   10602939 1266958423 10064
## - EducationFieldMarketing      1   12450415 1268805899 10065
## - BusinessTravelTravel_Rarely  1   16153884 1272509368 10067
## - YearsAtCompany               1   20683283 1277038767 10070
## - TotalWorkingYears            1   41330075 1297685559 10081
## - JobLevel                     1 4492102714 5748458198 11118
## 
## Step:  AIC=10059.39
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + JobLevel + MaritalStatusMarried + TotalWorkingYears + 
##     YearsAtCompany
## 
##                               Df  Sum of Sq        RSS   AIC
## - MaritalStatusMarried         1    2456764 1261188597 10059
## - EducationFieldOther          1    2748881 1261480714 10059
## <none>                                      1258731833 10059
## - DistanceFromHome             1   10995740 1269727573 10064
## - EducationFieldMarketing      1   12676108 1271407941 10064
## - BusinessTravelTravel_Rarely  1   15843567 1274575400 10066
## - YearsAtCompany               1   19688751 1278420584 10068
## - TotalWorkingYears            1   40362673 1299094506 10079
## - JobLevel                     1 4490481956 5749213789 11116
## 
## Step:  AIC=10058.75
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + JobLevel + TotalWorkingYears + YearsAtCompany
## 
##                               Df  Sum of Sq        RSS   AIC
## - EducationFieldOther          1    2801431 1263990028 10058
## <none>                                      1261188597 10059
## - DistanceFromHome             1   10113325 1271301922 10062
## - EducationFieldMarketing      1   13199667 1274388264 10064
## - BusinessTravelTravel_Rarely  1   17327190 1278515787 10066
## - YearsAtCompany               1   19331845 1280520442 10067
## - TotalWorkingYears            1   40924932 1302113529 10079
## - JobLevel                     1 4498896764 5760085360 11115
## 
## Step:  AIC=10058.3
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     JobLevel + TotalWorkingYears + YearsAtCompany
## 
##                               Df  Sum of Sq        RSS   AIC
## <none>                                      1263990028 10058
## - DistanceFromHome             1   10459269 1274449296 10062
## - EducationFieldMarketing      1   12090064 1276080092 10063
## - BusinessTravelTravel_Rarely  1   17043388 1281033416 10066
## - YearsAtCompany               1   19119253 1283109281 10067
## - TotalWorkingYears            1   42180220 1306170247 10079
## - JobLevel                     1 4498422130 5762412158 11114
## Start:  AIC=10051.47
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Education                         1         74 1224604087 10050
## - TrainingTimesLastYear             1        124 1224604137 10050
## - JobSatisfaction                   1       1036 1224605050 10050
## - Age                               1      64650 1224668664 10050
## - BusinessTravelTravel_Frequently   1     344091 1224948104 10050
## - YearsInCurrentRole                1     484800 1225088813 10050
## - MaritalStatusSingle               1     579132 1225183146 10050
## - PercentSalaryHike                 1     665518 1225269531 10050
## - YearsSinceLastPromotion           1     835700 1225439713 10050
## - NumCompaniesWorked                1     880924 1225484937 10050
## - OverTimeYes                       1    1018875 1225622888 10050
## - RelationshipSatisfaction          1    1421298 1226025311 10050
## - `EducationFieldTechnical Degree`  1    1648488 1226252501 10050
## - JobInvolvement                    1    1733563 1226337576 10050
## - EducationFieldMedical             1    1771361 1226375375 10050
## - YearsAtCompany                    1    1846204 1226450217 10050
## - `EducationFieldLife Sciences`     1    1862617 1226466630 10050
## - EducationFieldOther               1    2647595 1227251608 10051
## - GenderMale                        1    3330690 1227934703 10051
## <none>                                           1224604013 10052
## - BusinessTravelTravel_Rarely       1    5348795 1229952808 10052
## - EducationFieldMarketing           1    5771649 1230375662 10053
## - MaritalStatusMarried              1    8480435 1233084448 10054
## - YearsWithCurrManager              1    8708528 1233312541 10054
## - EnvironmentSatisfaction           1    9072349 1233676362 10055
## - DistanceFromHome                  1   10035888 1234639901 10055
## - TotalWorkingYears                 1   48986386 1273590399 10077
## - JobLevel                          1 4180942061 5405546074 11081
## 
## Step:  AIC=10049.47
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     JobSatisfaction + MaritalStatusMarried + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - TrainingTimesLastYear             1        138 1224604225 10048
## - JobSatisfaction                   1       1025 1224605112 10048
## - Age                               1      65306 1224669393 10048
## - BusinessTravelTravel_Frequently   1     344050 1224948137 10048
## - YearsInCurrentRole                1     485636 1225089723 10048
## - MaritalStatusSingle               1     579063 1225183150 10048
## - PercentSalaryHike                 1     665513 1225269600 10048
## - YearsSinceLastPromotion           1     836271 1225440358 10048
## - NumCompaniesWorked                1     893939 1225498026 10048
## - OverTimeYes                       1    1019069 1225623156 10048
## - RelationshipSatisfaction          1    1422614 1226026701 10048
## - `EducationFieldTechnical Degree`  1    1648436 1226252522 10048
## - JobInvolvement                    1    1733594 1226337681 10048
## - EducationFieldMedical             1    1771288 1226375375 10048
## - YearsAtCompany                    1    1847382 1226451469 10048
## - `EducationFieldLife Sciences`     1    1862545 1226466631 10048
## - EducationFieldOther               1    2648647 1227252734 10049
## - GenderMale                        1    3336401 1227940488 10049
## <none>                                           1224604087 10050
## - BusinessTravelTravel_Rarely       1    5351439 1229955525 10050
## - EducationFieldMarketing           1    5778486 1230382573 10051
## - MaritalStatusMarried              1    8484802 1233088888 10052
## - YearsWithCurrManager              1    8734798 1233338885 10052
## - EnvironmentSatisfaction           1    9080014 1233684101 10053
## - DistanceFromHome                  1   10079864 1234683951 10053
## - TotalWorkingYears                 1   49059955 1273664042 10075
## - JobLevel                          1 4186385639 5410989726 11080
## 
## Step:  AIC=10047.47
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     JobSatisfaction + MaritalStatusMarried + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - JobSatisfaction                   1       1012 1224605236 10046
## - Age                               1      65318 1224669543 10046
## - BusinessTravelTravel_Frequently   1     344236 1224948461 10046
## - YearsInCurrentRole                1     486407 1225090632 10046
## - MaritalStatusSingle               1     579401 1225183626 10046
## - PercentSalaryHike                 1     665383 1225269608 10046
## - YearsSinceLastPromotion           1     839681 1225443906 10046
## - NumCompaniesWorked                1     898816 1225503041 10046
## - OverTimeYes                       1    1020383 1225624608 10046
## - RelationshipSatisfaction          1    1423729 1226027954 10046
## - `EducationFieldTechnical Degree`  1    1648973 1226253198 10046
## - JobInvolvement                    1    1734563 1226338788 10046
## - EducationFieldMedical             1    1772518 1226376743 10046
## - YearsAtCompany                    1    1855013 1226459238 10046
## - `EducationFieldLife Sciences`     1    1862417 1226466642 10046
## - EducationFieldOther               1    2648649 1227252874 10047
## - GenderMale                        1    3337196 1227941421 10047
## <none>                                           1224604225 10048
## - BusinessTravelTravel_Rarely       1    5357180 1229961405 10048
## - EducationFieldMarketing           1    5778682 1230382907 10049
## - MaritalStatusMarried              1    8493526 1233097751 10050
## - YearsWithCurrManager              1    8737108 1233341333 10050
## - EnvironmentSatisfaction           1    9092017 1233696242 10051
## - DistanceFromHome                  1   10098690 1234702914 10051
## - TotalWorkingYears                 1   49077160 1273681385 10073
## - JobLevel                          1 4186666850 5411271075 11078
## 
## Step:  AIC=10045.47
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Age                               1      65935 1224671172 10044
## - BusinessTravelTravel_Frequently   1     343253 1224948489 10044
## - YearsInCurrentRole                1     489362 1225094598 10044
## - MaritalStatusSingle               1     584312 1225189549 10044
## - PercentSalaryHike                 1     667453 1225272689 10044
## - YearsSinceLastPromotion           1     839185 1225444421 10044
## - NumCompaniesWorked                1     902446 1225507682 10044
## - OverTimeYes                       1    1020349 1225625585 10044
## - RelationshipSatisfaction          1    1424171 1226029408 10044
## - `EducationFieldTechnical Degree`  1    1648314 1226253551 10044
## - JobInvolvement                    1    1734458 1226339695 10044
## - EducationFieldMedical             1    1771798 1226377035 10044
## - `EducationFieldLife Sciences`     1    1861485 1226466721 10044
## - YearsAtCompany                    1    1861913 1226467150 10044
## - EducationFieldOther               1    2648020 1227253257 10045
## - GenderMale                        1    3357643 1227962879 10045
## <none>                                           1224605236 10046
## - BusinessTravelTravel_Rarely       1    5356918 1229962155 10046
## - EducationFieldMarketing           1    5777683 1230382920 10047
## - MaritalStatusMarried              1    8503112 1233108349 10048
## - YearsWithCurrManager              1    8742711 1233347947 10048
## - EnvironmentSatisfaction           1    9091041 1233696277 10049
## - DistanceFromHome                  1   10110584 1234715820 10049
## - TotalWorkingYears                 1   49076771 1273682007 10071
## - JobLevel                          1 4196375347 5420980584 11077
## 
## Step:  AIC=10043.51
## .outcome ~ BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - BusinessTravelTravel_Frequently   1     361228 1225032399 10042
## - YearsInCurrentRole                1     505384 1225176555 10042
## - MaritalStatusSingle               1     563573 1225234745 10042
## - PercentSalaryHike                 1     684263 1225355435 10042
## - YearsSinceLastPromotion           1     836959 1225508130 10042
## - NumCompaniesWorked                1     864154 1225535326 10042
## - OverTimeYes                       1    1046001 1225717172 10042
## - RelationshipSatisfaction          1    1428220 1226099392 10042
## - `EducationFieldTechnical Degree`  1    1636588 1226307760 10042
## - JobInvolvement                    1    1757867 1226429039 10042
## - EducationFieldMedical             1    1767570 1226438742 10042
## - `EducationFieldLife Sciences`     1    1848630 1226519801 10043
## - YearsAtCompany                    1    1917217 1226588389 10043
## - EducationFieldOther               1    2655203 1227326375 10043
## - GenderMale                        1    3344878 1228016049 10043
## <none>                                           1224671172 10044
## - BusinessTravelTravel_Rarely       1    5298721 1229969893 10044
## - EducationFieldMarketing           1    5744560 1230415731 10045
## - MaritalStatusMarried              1    8483875 1233155047 10046
## - YearsWithCurrManager              1    8743824 1233414996 10046
## - EnvironmentSatisfaction           1    9078437 1233749608 10047
## - DistanceFromHome                  1   10124536 1234795707 10047
## - TotalWorkingYears                 1   65084559 1289755730 10078
## - JobLevel                          1 4207522814 5432193986 11077
## 
## Step:  AIC=10041.71
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusSingle               1     485814 1225518214 10040
## - YearsInCurrentRole                1     503067 1225535466 10040
## - PercentSalaryHike                 1     692212 1225724611 10040
## - NumCompaniesWorked                1     821935 1225854334 10040
## - YearsSinceLastPromotion           1     835432 1225867831 10040
## - OverTimeYes                       1     953174 1225985573 10040
## - RelationshipSatisfaction          1    1381272 1226413672 10040
## - `EducationFieldTechnical Degree`  1    1621526 1226653925 10041
## - JobInvolvement                    1    1686755 1226719154 10041
## - EducationFieldMedical             1    1736285 1226768684 10041
## - `EducationFieldLife Sciences`     1    1831612 1226864011 10041
## - YearsAtCompany                    1    1959265 1226991664 10041
## - EducationFieldOther               1    2625080 1227657479 10041
## - GenderMale                        1    3398745 1228431145 10042
## <none>                                           1225032399 10042
## - EducationFieldMarketing           1    5734506 1230766905 10043
## - MaritalStatusMarried              1    8313529 1233345928 10044
## - YearsWithCurrManager              1    8601360 1233633759 10045
## - EnvironmentSatisfaction           1    9048470 1234080869 10045
## - DistanceFromHome                  1   10058580 1235090979 10045
## - BusinessTravelTravel_Rarely       1   16338433 1241370832 10049
## - TotalWorkingYears                 1   64744793 1289777192 10076
## - JobLevel                          1 4216750933 5441783332 11076
## 
## Step:  AIC=10039.99
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsInCurrentRole                1     533409 1226051622 10038
## - PercentSalaryHike                 1     701805 1226220019 10038
## - NumCompaniesWorked                1     820726 1226338940 10038
## - YearsSinceLastPromotion           1     886495 1226404708 10038
## - OverTimeYes                       1     936296 1226454509 10038
## - RelationshipSatisfaction          1    1468271 1226986485 10039
## - JobInvolvement                    1    1521937 1227040150 10039
## - `EducationFieldTechnical Degree`  1    1649239 1227167452 10039
## - EducationFieldMedical             1    1757602 1227275815 10039
## - `EducationFieldLife Sciences`     1    1847039 1227365252 10039
## - YearsAtCompany                    1    1996176 1227514389 10039
## - EducationFieldOther               1    2581644 1228099858 10040
## - GenderMale                        1    3218844 1228737058 10040
## <none>                                           1225518214 10040
## - EducationFieldMarketing           1    5761375 1231279588 10041
## - YearsWithCurrManager              1    8445266 1233963480 10043
## - EnvironmentSatisfaction           1    9061804 1234580018 10043
## - MaritalStatusMarried              1   10085130 1235603343 10044
## - DistanceFromHome                  1   10170502 1235688715 10044
## - BusinessTravelTravel_Rarely       1   16308389 1241826602 10047
## - TotalWorkingYears                 1   64612465 1290130678 10074
## - JobLevel                          1 4219620977 5445139191 11074
## 
## Step:  AIC=10038.29
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - PercentSalaryHike                 1     642631 1226694253 10037
## - YearsSinceLastPromotion           1     771837 1226823459 10037
## - NumCompaniesWorked                1     905118 1226956741 10037
## - OverTimeYes                       1     946120 1226997742 10037
## - JobInvolvement                    1    1413597 1227465220 10037
## - RelationshipSatisfaction          1    1451702 1227503324 10037
## - `EducationFieldTechnical Degree`  1    1907962 1227959584 10037
## - EducationFieldMedical             1    1959337 1228010960 10037
## - `EducationFieldLife Sciences`     1    2090165 1228141787 10038
## - EducationFieldOther               1    2867253 1228918875 10038
## - GenderMale                        1    3287102 1229338724 10038
## <none>                                           1226051622 10038
## - YearsAtCompany                    1    3579584 1229631207 10038
## - EducationFieldMarketing           1    6200181 1232251803 10040
## - EnvironmentSatisfaction           1    9503931 1235555553 10042
## - MaritalStatusMarried              1    9732947 1235784569 10042
## - DistanceFromHome                  1   10092533 1236144155 10042
## - YearsWithCurrManager              1   10751515 1236803137 10042
## - BusinessTravelTravel_Rarely       1   16097330 1242148953 10045
## - TotalWorkingYears                 1   64765591 1290817214 10072
## - JobLevel                          1 4221423825 5447475447 11073
## 
## Step:  AIC=10036.66
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + OverTimeYes + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsSinceLastPromotion           1     706406 1227400660 10035
## - NumCompaniesWorked                1     924176 1227618429 10035
## - OverTimeYes                       1     934642 1227628895 10035
## - RelationshipSatisfaction          1    1357926 1228052179 10035
## - JobInvolvement                    1    1410523 1228104776 10036
## - EducationFieldMedical             1    1960574 1228654827 10036
## - `EducationFieldTechnical Degree`  1    1997539 1228691792 10036
## - `EducationFieldLife Sciences`     1    2108182 1228802435 10036
## - EducationFieldOther               1    2861804 1229556057 10036
## - GenderMale                        1    3269623 1229963876 10036
## <none>                                           1226694253 10037
## - YearsAtCompany                    1    3600236 1230294489 10037
## - EducationFieldMarketing           1    6287278 1232981532 10038
## - EnvironmentSatisfaction           1    9521313 1236215567 10040
## - MaritalStatusMarried              1    9654025 1236348278 10040
## - DistanceFromHome                  1    9752394 1236446647 10040
## - YearsWithCurrManager              1   10709729 1237403982 10041
## - BusinessTravelTravel_Rarely       1   16184105 1242878358 10044
## - TotalWorkingYears                 1   64541178 1291235431 10070
## - JobLevel                          1 4222792611 5449486865 11071
## 
## Step:  AIC=10035.06
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + OverTimeYes + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - OverTimeYes                       1     909384 1228310044 10034
## - NumCompaniesWorked                1     945261 1228345920 10034
## - JobInvolvement                    1    1400311 1228800970 10034
## - RelationshipSatisfaction          1    1435204 1228835863 10034
## - EducationFieldMedical             1    1787765 1229188424 10034
## - `EducationFieldTechnical Degree`  1    1804681 1229205341 10034
## - `EducationFieldLife Sciences`     1    1939185 1229339844 10034
## - EducationFieldOther               1    2750433 1230151092 10035
## - YearsAtCompany                    1    2932580 1230333239 10035
## - GenderMale                        1    3410687 1230811346 10035
## <none>                                           1227400660 10035
## - EducationFieldMarketing           1    6011752 1233412412 10036
## - EnvironmentSatisfaction           1    9290844 1236691504 10038
## - DistanceFromHome                  1    9755907 1237156567 10039
## - MaritalStatusMarried              1    9860806 1237261465 10039
## - YearsWithCurrManager              1   10438817 1237839477 10039
## - BusinessTravelTravel_Rarely       1   15809207 1243209867 10042
## - TotalWorkingYears                 1   66562314 1293962974 10070
## - JobLevel                          1 4236406951 5463807610 11071
## 
## Step:  AIC=10033.57
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + RelationshipSatisfaction + TotalWorkingYears + 
##     YearsAtCompany + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - NumCompaniesWorked                1     936159 1229246203 10032
## - JobInvolvement                    1    1301496 1229611540 10032
## - RelationshipSatisfaction          1    1502735 1229812779 10032
## - EducationFieldMedical             1    1609330 1229919374 10032
## - `EducationFieldTechnical Degree`  1    1656079 1229966123 10032
## - `EducationFieldLife Sciences`     1    1754891 1230064935 10033
## - EducationFieldOther               1    2551182 1230861226 10033
## - YearsAtCompany                    1    2881609 1231191653 10033
## - GenderMale                        1    3506179 1231816223 10034
## <none>                                           1228310044 10034
## - EducationFieldMarketing           1    5757981 1234068025 10035
## - EnvironmentSatisfaction           1    8915507 1237225551 10037
## - DistanceFromHome                  1    9371053 1237681097 10037
## - MaritalStatusMarried              1    9617601 1237927645 10037
## - YearsWithCurrManager              1   10480035 1238790079 10038
## - BusinessTravelTravel_Rarely       1   15947115 1244257159 10040
## - TotalWorkingYears                 1   66105871 1294415915 10068
## - JobLevel                          1 4238287670 5466597714 11069
## 
## Step:  AIC=10032.1
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     RelationshipSatisfaction + TotalWorkingYears + YearsAtCompany + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - RelationshipSatisfaction          1    1358599 1230604802 10031
## - JobInvolvement                    1    1418238 1230664440 10031
## - EducationFieldMedical             1    1704592 1230950794 10031
## - `EducationFieldTechnical Degree`  1    1790809 1231037012 10031
## - `EducationFieldLife Sciences`     1    1878154 1231124356 10031
## - YearsAtCompany                    1    2148617 1231394820 10031
## - EducationFieldOther               1    2640417 1231886619 10032
## <none>                                           1229246203 10032
## - GenderMale                        1    3559427 1232805630 10032
## - EducationFieldMarketing           1    5922557 1235168760 10033
## - EnvironmentSatisfaction           1    8976807 1238223009 10035
## - DistanceFromHome                  1    9196285 1238442488 10035
## - MaritalStatusMarried              1    9425318 1238671521 10035
## - YearsWithCurrManager              1   10391434 1239637637 10036
## - BusinessTravelTravel_Rarely       1   16204440 1245450642 10039
## - TotalWorkingYears                 1   72263675 1301509878 10070
## - JobLevel                          1 4300922356 5530168559 11075
## 
## Step:  AIC=10030.87
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsAtCompany + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - JobInvolvement                    1    1530809 1232135611 10030
## - EducationFieldMedical             1    1747966 1232352767 10030
## - `EducationFieldTechnical Degree`  1    1857438 1232462240 10030
## - `EducationFieldLife Sciences`     1    1968258 1232573060 10030
## - YearsAtCompany                    1    2087368 1232692170 10030
## - EducationFieldOther               1    2756859 1233361661 10030
## <none>                                           1230604802 10031
## - GenderMale                        1    3566069 1234170871 10031
## - EducationFieldMarketing           1    6069163 1236673964 10032
## - EnvironmentSatisfaction           1    8908549 1239513351 10034
## - MaritalStatusMarried              1    8932713 1239537514 10034
## - DistanceFromHome                  1    8988952 1239593753 10034
## - YearsWithCurrManager              1   10696021 1241300823 10035
## - BusinessTravelTravel_Rarely       1   15665404 1246270205 10038
## - TotalWorkingYears                 1   71666906 1302271708 10068
## - JobLevel                          1 4322591265 5553196066 11076
## 
## Step:  AIC=10029.73
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobLevel + MaritalStatusMarried + TotalWorkingYears + 
##     YearsAtCompany + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldMedical             1    1605575 1233741186 10029
## - `EducationFieldTechnical Degree`  1    1725061 1233860673 10029
## - `EducationFieldLife Sciences`     1    1803104 1233938715 10029
## - YearsAtCompany                    1    2555995 1234691606 10029
## - EducationFieldOther               1    2641305 1234776916 10029
## <none>                                           1232135611 10030
## - GenderMale                        1    3630179 1235765790 10030
## - EducationFieldMarketing           1    5924452 1238060063 10031
## - EnvironmentSatisfaction           1    8984145 1241119756 10033
## - DistanceFromHome                  1    9028677 1241164288 10033
## - MaritalStatusMarried              1    9129235 1241264846 10033
## - YearsWithCurrManager              1   10143278 1242278889 10033
## - BusinessTravelTravel_Rarely       1   16279517 1248415129 10037
## - TotalWorkingYears                 1   72327987 1304463598 10067
## - JobLevel                          1 4323354844 5555490455 11074
## 
## Step:  AIC=10028.64
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsAtCompany + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldTechnical Degree`  1     142203 1233883390 10027
## - `EducationFieldLife Sciences`     1     209530 1233950716 10027
## - EducationFieldOther               1    1132910 1234874096 10027
## - YearsAtCompany                    1    2527580 1236268766 10028
## <none>                                           1233741186 10029
## - GenderMale                        1    3618152 1237359338 10029
## - EnvironmentSatisfaction           1    8725010 1242466196 10032
## - DistanceFromHome                  1    9218581 1242959768 10032
## - MaritalStatusMarried              1    9986410 1243727596 10032
## - YearsWithCurrManager              1   10267974 1244009160 10032
## - EducationFieldMarketing           1   11405221 1245146408 10033
## - BusinessTravelTravel_Rarely       1   16133068 1249874255 10036
## - TotalWorkingYears                 1   71371231 1305112418 10066
## - JobLevel                          1 4352992901 5586734087 11076
## 
## Step:  AIC=10026.72
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldOther + EnvironmentSatisfaction + 
##     GenderMale + JobLevel + MaritalStatusMarried + TotalWorkingYears + 
##     YearsAtCompany + YearsWithCurrManager
## 
##                                 Df  Sum of Sq        RSS   AIC
## - `EducationFieldLife Sciences`  1     118657 1234002047 10025
## - EducationFieldOther            1    1025630 1234909020 10025
## - YearsAtCompany                 1    2494314 1236377704 10026
## <none>                                        1233883390 10027
## - GenderMale                     1    3651486 1237534876 10027
## - EnvironmentSatisfaction        1    8809142 1242692532 10030
## - DistanceFromHome               1    9119033 1243002422 10030
## - MaritalStatusMarried           1    9894199 1243777589 10030
## - YearsWithCurrManager           1   10290776 1244174165 10030
## - EducationFieldMarketing        1   11465933 1245349323 10031
## - BusinessTravelTravel_Rarely    1   16043998 1249927387 10034
## - TotalWorkingYears              1   71546992 1305430382 10064
## - JobLevel                       1 4352960620 5586844009 11074
## 
## Step:  AIC=10024.78
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + EnvironmentSatisfaction + GenderMale + 
##     JobLevel + MaritalStatusMarried + TotalWorkingYears + YearsAtCompany + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - EducationFieldOther          1     919280 1234921326 10023
## - YearsAtCompany               1    2474661 1236476708 10024
## <none>                                      1234002047 10025
## - GenderMale                   1    3632918 1237634964 10025
## - EnvironmentSatisfaction      1    8821761 1242823808 10028
## - DistanceFromHome             1    9069812 1243071859 10028
## - MaritalStatusMarried         1    9887279 1243889326 10028
## - YearsWithCurrManager         1   10359236 1244361283 10029
## - EducationFieldMarketing      1   12015698 1246017745 10030
## - BusinessTravelTravel_Rarely  1   16036553 1250038600 10032
## - TotalWorkingYears            1   71774292 1305776339 10062
## - JobLevel                     1 4361730065 5595732112 11073
## 
## Step:  AIC=10023.3
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + GenderMale + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsAtCompany + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - YearsAtCompany               1    2488897 1237410223 10023
## - GenderMale                   1    3533398 1238454724 10023
## <none>                                      1234921326 10023
## - DistanceFromHome             1    9070771 1243992097 10026
## - EnvironmentSatisfaction      1    9228618 1244149944 10026
## - MaritalStatusMarried         1    9901386 1244822713 10027
## - YearsWithCurrManager         1   10439557 1245360884 10027
## - EducationFieldMarketing      1   11530144 1246451471 10028
## - BusinessTravelTravel_Rarely  1   15723386 1250644712 10030
## - TotalWorkingYears            1   73070751 1307992078 10061
## - JobLevel                     1 4365386837 5600308164 11072
## 
## Step:  AIC=10022.7
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + GenderMale + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - GenderMale                   1    3538131 1240948354 10023
## <none>                                      1237410223 10023
## - DistanceFromHome             1    8932533 1246342756 10026
## - EnvironmentSatisfaction      1    9063084 1246473307 10026
## - MaritalStatusMarried         1    9524420 1246934644 10026
## - EducationFieldMarketing      1   11317994 1248728217 10027
## - BusinessTravelTravel_Rarely  1   15820048 1253230271 10030
## - YearsWithCurrManager         1   34957360 1272367583 10040
## - TotalWorkingYears            1   72166748 1309576972 10060
## - JobLevel                     1 4369291597 5606701821 11071
## 
## Step:  AIC=10022.68
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## <none>                                      1240948354 10023
## - EnvironmentSatisfaction      1    8730951 1249679306 10026
## - MaritalStatusMarried         1    8881936 1249830290 10026
## - DistanceFromHome             1    9116651 1250065005 10026
## - EducationFieldMarketing      1   11795152 1252743507 10027
## - BusinessTravelTravel_Rarely  1   16022434 1256970789 10030
## - YearsWithCurrManager         1   35939694 1276888048 10040
## - TotalWorkingYears            1   71082880 1312031234 10059
## - JobLevel                     1 4367891044 5608839399 11069
## Start:  AIC=10097.85
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - RelationshipSatisfaction          1       1896 1259564161 10096
## - GenderMale                        1      11539 1259573804 10096
## - YearsAtCompany                    1      29739 1259592004 10096
## - EducationFieldMedical             1      30115 1259592380 10096
## - BusinessTravelTravel_Frequently   1      81831 1259644096 10096
## - EducationFieldOther               1     113633 1259675898 10096
## - `EducationFieldLife Sciences`     1     141338 1259703603 10096
## - `EducationFieldTechnical Degree`  1     203062 1259765327 10096
## - MaritalStatusMarried              1     222539 1259784804 10096
## - TrainingTimesLastYear             1     257444 1259819709 10096
## - YearsSinceLastPromotion           1     442320 1260004585 10096
## - JobSatisfaction                   1     490737 1260053002 10096
## - Age                               1     755918 1260318183 10096
## - OverTimeYes                       1     790666 1260352931 10096
## - PercentSalaryHike                 1     985230 1260547495 10096
## - YearsInCurrentRole                1    1010524 1260572789 10096
## - NumCompaniesWorked                1    1299019 1260861284 10097
## - Education                         1    1425163 1260987428 10097
## - MaritalStatusSingle               1    1526712 1261088977 10097
## - JobInvolvement                    1    2011538 1261573803 10097
## - EducationFieldMarketing           1    2273497 1261835762 10097
## <none>                                           1259562265 10098
## - BusinessTravelTravel_Rarely       1    5728747 1265291012 10099
## - EnvironmentSatisfaction           1    6615192 1266177457 10100
## - YearsWithCurrManager              1    7079703 1266641968 10100
## - DistanceFromHome                  1   13840654 1273402919 10104
## - TotalWorkingYears                 1   51582819 1311145084 10124
## - JobLevel                          1 4306478466 5566040731 11132
## 
## Step:  AIC=10095.85
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - GenderMale                        1      11155 1259575317 10094
## - YearsAtCompany                    1      29001 1259593163 10094
## - EducationFieldMedical             1      29502 1259593663 10094
## - BusinessTravelTravel_Frequently   1      80840 1259645001 10094
## - EducationFieldOther               1     112253 1259676415 10094
## - `EducationFieldLife Sciences`     1     139737 1259703899 10094
## - `EducationFieldTechnical Degree`  1     201441 1259765603 10094
## - MaritalStatusMarried              1     225456 1259789617 10094
## - TrainingTimesLastYear             1     256881 1259821043 10094
## - YearsSinceLastPromotion           1     444319 1260008480 10094
## - JobSatisfaction                   1     489068 1260053230 10094
## - Age                               1     758832 1260322993 10094
## - OverTimeYes                       1     791087 1260355249 10094
## - PercentSalaryHike                 1     990797 1260554958 10094
## - YearsInCurrentRole                1    1008669 1260572831 10094
## - NumCompaniesWorked                1    1309133 1260873294 10095
## - Education                         1    1436907 1261001068 10095
## - MaritalStatusSingle               1    1529077 1261093239 10095
## - JobInvolvement                    1    2011759 1261575921 10095
## - EducationFieldMarketing           1    2272323 1261836485 10095
## <none>                                           1259564161 10096
## - BusinessTravelTravel_Rarely       1    5730623 1265294785 10097
## - EnvironmentSatisfaction           1    6613599 1266177760 10098
## - YearsWithCurrManager              1    7077878 1266642039 10098
## - DistanceFromHome                  1   13879390 1273443551 10102
## - TotalWorkingYears                 1   51757430 1311321591 10122
## - JobLevel                          1 4310847945 5570412106 11130
## 
## Step:  AIC=10093.86
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsAtCompany                    1      28391 1259603708 10092
## - EducationFieldMedical             1      32936 1259608252 10092
## - BusinessTravelTravel_Frequently   1      77795 1259653112 10092
## - EducationFieldOther               1     116145 1259691462 10092
## - `EducationFieldLife Sciences`     1     147646 1259722962 10092
## - `EducationFieldTechnical Degree`  1     210081 1259785398 10092
## - MaritalStatusMarried              1     219632 1259794949 10092
## - TrainingTimesLastYear             1     259657 1259834973 10092
## - YearsSinceLastPromotion           1     439426 1260014742 10092
## - JobSatisfaction                   1     490834 1260066151 10092
## - Age                               1     763717 1260339034 10092
## - OverTimeYes                       1     793469 1260368786 10092
## - PercentSalaryHike                 1     989996 1260565313 10092
## - YearsInCurrentRole                1    1015491 1260590808 10092
## - NumCompaniesWorked                1    1314632 1260889949 10093
## - Education                         1    1440599 1261015915 10093
## - MaritalStatusSingle               1    1552635 1261127952 10093
## - JobInvolvement                    1    2012425 1261587741 10093
## - EducationFieldMarketing           1    2325726 1261901042 10093
## <none>                                           1259575317 10094
## - BusinessTravelTravel_Rarely       1    5725821 1265301138 10095
## - EnvironmentSatisfaction           1    6605415 1266180732 10096
## - YearsWithCurrManager              1    7089244 1266664561 10096
## - DistanceFromHome                  1   13899352 1273474669 10100
## - TotalWorkingYears                 1   51770185 1311345502 10120
## - JobLevel                          1 4310861510 5570436826 11128
## 
## Step:  AIC=10091.87
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldMedical             1      33510 1259637218 10090
## - BusinessTravelTravel_Frequently   1      74287 1259677995 10090
## - EducationFieldOther               1     121786 1259725493 10090
## - `EducationFieldLife Sciences`     1     150915 1259754622 10090
## - `EducationFieldTechnical Degree`  1     214899 1259818607 10090
## - MaritalStatusMarried              1     223821 1259827528 10090
## - TrainingTimesLastYear             1     268666 1259872373 10090
## - YearsSinceLastPromotion           1     415220 1260018928 10090
## - JobSatisfaction                   1     472352 1260076060 10090
## - Age                               1     786336 1260390044 10090
## - OverTimeYes                       1     799431 1260403139 10090
## - PercentSalaryHike                 1     989806 1260593513 10090
## - YearsInCurrentRole                1    1039372 1260643080 10090
## - Education                         1    1429671 1261033379 10091
## - NumCompaniesWorked                1    1517786 1261121493 10091
## - MaritalStatusSingle               1    1543297 1261147004 10091
## - JobInvolvement                    1    1986738 1261590446 10091
## - EducationFieldMarketing           1    2339900 1261943607 10091
## <none>                                           1259603708 10092
## - BusinessTravelTravel_Rarely       1    5709427 1265313135 10093
## - EnvironmentSatisfaction           1    6619060 1266222767 10094
## - YearsWithCurrManager              1    8056994 1267660701 10094
## - DistanceFromHome                  1   13971097 1273574805 10098
## - TotalWorkingYears                 1   57986224 1317589931 10121
## - JobLevel                          1 4337435376 5597039084 11129
## 
## Step:  AIC=10089.89
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - BusinessTravelTravel_Frequently   1      73784 1259711002 10088
## - EducationFieldOther               1     137714 1259774932 10088
## - MaritalStatusMarried              1     228173 1259865391 10088
## - TrainingTimesLastYear             1     257949 1259895166 10088
## - `EducationFieldTechnical Degree`  1     405191 1260042409 10088
## - YearsSinceLastPromotion           1     428633 1260065850 10088
## - JobSatisfaction                   1     473334 1260110552 10088
## - `EducationFieldLife Sciences`     1     492989 1260130206 10088
## - Age                               1     784677 1260421895 10088
## - OverTimeYes                       1     794154 1260431371 10088
## - PercentSalaryHike                 1     989846 1260627064 10088
## - YearsInCurrentRole                1    1038874 1260676092 10088
## - Education                         1    1438450 1261075668 10089
## - NumCompaniesWorked                1    1530638 1261167856 10089
## - MaritalStatusSingle               1    1558508 1261195726 10089
## - JobInvolvement                    1    1986996 1261624214 10089
## <none>                                           1259637218 10090
## - BusinessTravelTravel_Rarely       1    5699625 1265336843 10091
## - EnvironmentSatisfaction           1    6597561 1266234779 10092
## - YearsWithCurrManager              1    8085348 1267722565 10092
## - EducationFieldMarketing           1   10407895 1270045112 10094
## - DistanceFromHome                  1   14021980 1273659198 10096
## - TotalWorkingYears                 1   58033241 1317670459 10119
## - JobLevel                          1 4337805134 5597442352 11128
## 
## Step:  AIC=10087.93
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldOther               1     129276 1259840278 10086
## - MaritalStatusMarried              1     254889 1259965891 10086
## - TrainingTimesLastYear             1     281225 1259992227 10086
## - `EducationFieldTechnical Degree`  1     394957 1260105959 10086
## - YearsSinceLastPromotion           1     419555 1260130557 10086
## - JobSatisfaction                   1     457777 1260168779 10086
## - `EducationFieldLife Sciences`     1     478823 1260189825 10086
## - Age                               1     791142 1260502144 10086
## - OverTimeYes                       1     818858 1260529860 10086
## - PercentSalaryHike                 1     969549 1260680551 10086
## - YearsInCurrentRole                1    1033790 1260744792 10086
## - Education                         1    1431680 1261142682 10087
## - MaritalStatusSingle               1    1501991 1261212993 10087
## - NumCompaniesWorked                1    1567558 1261278560 10087
## - JobInvolvement                    1    2041882 1261752884 10087
## <none>                                           1259711002 10088
## - EnvironmentSatisfaction           1    6599859 1266310861 10090
## - YearsWithCurrManager              1    8105749 1267816751 10090
## - EducationFieldMarketing           1   10340795 1270051797 10092
## - BusinessTravelTravel_Rarely       1   10517070 1270228072 10092
## - DistanceFromHome                  1   14149455 1273860457 10094
## - TotalWorkingYears                 1   58260615 1317971617 10117
## - JobLevel                          1 4338633026 5598344028 11126
## 
## Step:  AIC=10086
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusMarried              1     253158 1260093436 10084
## - TrainingTimesLastYear             1     289718 1260129996 10084
## - `EducationFieldTechnical Degree`  1     327771 1260168049 10084
## - `EducationFieldLife Sciences`     1     374966 1260215244 10084
## - YearsSinceLastPromotion           1     399508 1260239786 10084
## - JobSatisfaction                   1     472059 1260312337 10084
## - Age                               1     766071 1260606349 10084
## - OverTimeYes                       1     814919 1260655198 10084
## - PercentSalaryHike                 1     939737 1260780015 10084
## - YearsInCurrentRole                1    1022190 1260862468 10085
## - Education                         1    1409867 1261250145 10085
## - MaritalStatusSingle               1    1521756 1261362034 10085
## - NumCompaniesWorked                1    1564319 1261404598 10085
## - JobInvolvement                    1    2102208 1261942486 10085
## <none>                                           1259840278 10086
## - EnvironmentSatisfaction           1    6853814 1266694092 10088
## - YearsWithCurrManager              1    8081801 1267922079 10088
## - EducationFieldMarketing           1   10316830 1270157108 10090
## - BusinessTravelTravel_Rarely       1   10454433 1270294711 10090
## - DistanceFromHome                  1   14137785 1273978063 10092
## - TotalWorkingYears                 1   58396362 1318236640 10116
## - JobLevel                          1 4345549084 5605389363 11124
## 
## Step:  AIC=10084.14
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - TrainingTimesLastYear             1     296729 1260390165 10082
## - `EducationFieldTechnical Degree`  1     305946 1260399382 10082
## - `EducationFieldLife Sciences`     1     361652 1260455088 10082
## - YearsSinceLastPromotion           1     393776 1260487212 10082
## - JobSatisfaction                   1     449122 1260542557 10082
## - Age                               1     773527 1260866963 10083
## - OverTimeYes                       1     788440 1260881876 10083
## - PercentSalaryHike                 1     930126 1261023562 10083
## - YearsInCurrentRole                1     978590 1261072026 10083
## - Education                         1    1411319 1261504755 10083
## - NumCompaniesWorked                1    1553158 1261646594 10083
## - JobInvolvement                    1    2064560 1262157996 10083
## <none>                                           1260093436 10084
## - MaritalStatusSingle               1    3863951 1263957387 10084
## - EnvironmentSatisfaction           1    6945761 1267039197 10086
## - YearsWithCurrManager              1    8169256 1268262692 10087
## - EducationFieldMarketing           1   10371569 1270465005 10088
## - BusinessTravelTravel_Rarely       1   10696982 1270790418 10088
## - DistanceFromHome                  1   13956184 1274049620 10090
## - TotalWorkingYears                 1   58518334 1318611770 10114
## - JobLevel                          1 4345752633 5605846068 11122
## 
## Step:  AIC=10082.31
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + TotalWorkingYears + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldTechnical Degree`  1     340742 1260730907 10080
## - YearsSinceLastPromotion           1     412000 1260802165 10080
## - `EducationFieldLife Sciences`     1     443668 1260833833 10081
## - JobSatisfaction                   1     493433 1260883598 10081
## - OverTimeYes                       1     724996 1261115161 10081
## - Age                               1     748772 1261138937 10081
## - PercentSalaryHike                 1     944806 1261334971 10081
## - YearsInCurrentRole                1     975991 1261366156 10081
## - Education                         1    1376156 1261766321 10081
## - NumCompaniesWorked                1    1629845 1262020010 10081
## - JobInvolvement                    1    2072948 1262463113 10082
## <none>                                           1260390165 10082
## - MaritalStatusSingle               1    3837588 1264227753 10082
## - EnvironmentSatisfaction           1    7096639 1267486804 10084
## - YearsWithCurrManager              1    8093361 1268483526 10085
## - EducationFieldMarketing           1   10561762 1270951927 10086
## - BusinessTravelTravel_Rarely       1   10715519 1271105684 10086
## - DistanceFromHome                  1   14052467 1274442632 10088
## - TotalWorkingYears                 1   58426476 1318816641 10112
## - JobLevel                          1 4352436713 5612826878 11121
## 
## Step:  AIC=10080.5
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + TotalWorkingYears + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                 Df  Sum of Sq        RSS   AIC
## - `EducationFieldLife Sciences`  1     264371 1260995278 10079
## - YearsSinceLastPromotion        1     414549 1261145456 10079
## - JobSatisfaction                1     461220 1261192127 10079
## - OverTimeYes                    1     762521 1261493427 10079
## - Age                            1     773773 1261504680 10079
## - YearsInCurrentRole             1     987363 1261718270 10079
## - PercentSalaryHike              1     991817 1261722723 10079
## - Education                      1    1350792 1262081698 10079
## - NumCompaniesWorked             1    1702872 1262433779 10079
## - JobInvolvement                 1    2072760 1262803666 10080
## <none>                                        1260730907 10080
## - MaritalStatusSingle            1    3825863 1264556769 10081
## - EnvironmentSatisfaction        1    7233273 1267964180 10082
## - YearsWithCurrManager           1    8152943 1268883850 10083
## - EducationFieldMarketing        1   10225563 1270956470 10084
## - BusinessTravelTravel_Rarely    1   10675014 1271405920 10084
## - DistanceFromHome               1   14157681 1274888588 10086
## - TotalWorkingYears              1   59476207 1320207114 10111
## - JobLevel                       1 4352223450 5612954357 11119
## 
## Step:  AIC=10078.64
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + EducationFieldMarketing + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + TotalWorkingYears + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - YearsSinceLastPromotion      1     400023 1261395301 10077
## - JobSatisfaction              1     471577 1261466855 10077
## - OverTimeYes                  1     795799 1261791077 10077
## - Age                          1     844705 1261839983 10077
## - PercentSalaryHike            1     966666 1261961944 10077
## - YearsInCurrentRole           1     995659 1261990937 10077
## - Education                    1    1312354 1262307632 10077
## - NumCompaniesWorked           1    1767183 1262762461 10078
## - JobInvolvement               1    2051383 1263046661 10078
## <none>                                      1260995278 10079
## - MaritalStatusSingle          1    3856868 1264852146 10079
## - EnvironmentSatisfaction      1    7136480 1268131758 10081
## - YearsWithCurrManager         1    8194569 1269189847 10081
## - EducationFieldMarketing      1   10221016 1271216294 10082
## - BusinessTravelTravel_Rarely  1   10562665 1271557943 10082
## - DistanceFromHome             1   14020882 1275016160 10084
## - TotalWorkingYears            1   60245757 1321241035 10109
## - JobLevel                     1 4353699767 5614695045 11118
## 
## Step:  AIC=10076.86
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + EducationFieldMarketing + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + JobSatisfaction + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + TotalWorkingYears + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - JobSatisfaction              1     442562 1261837863 10075
## - OverTimeYes                  1     770981 1262166283 10075
## - Age                          1     828846 1262224147 10075
## - PercentSalaryHike            1    1055033 1262450334 10075
## - Education                    1    1279872 1262675173 10076
## - YearsInCurrentRole           1    1439206 1262834507 10076
## - NumCompaniesWorked           1    1597871 1262993172 10076
## - JobInvolvement               1    2138999 1263534300 10076
## <none>                                      1261395301 10077
## - MaritalStatusSingle          1    3793494 1265188795 10077
## - EnvironmentSatisfaction      1    7088149 1268483450 10079
## - YearsWithCurrManager         1    8876228 1270271529 10080
## - EducationFieldMarketing      1   10178655 1271573956 10080
## - BusinessTravelTravel_Rarely  1   11075949 1272471250 10081
## - DistanceFromHome             1   13824975 1275220276 10082
## - TotalWorkingYears            1   60528224 1321923525 10108
## - JobLevel                     1 4369015038 5630410339 11118
## 
## Step:  AIC=10075.11
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + EducationFieldMarketing + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - OverTimeYes                  1     741679 1262579542 10074
## - Age                          1     849804 1262687667 10074
## - PercentSalaryHike            1    1058629 1262896492 10074
## - Education                    1    1235433 1263073296 10074
## - NumCompaniesWorked           1    1484797 1263322660 10074
## - YearsInCurrentRole           1    1507522 1263345385 10074
## - JobInvolvement               1    2238292 1264076156 10074
## <none>                                      1261837863 10075
## - MaritalStatusSingle          1    3908287 1265746150 10075
## - EnvironmentSatisfaction      1    6959349 1268797212 10077
## - YearsWithCurrManager         1    8815690 1270653554 10078
## - EducationFieldMarketing      1   10061932 1271899795 10079
## - BusinessTravelTravel_Rarely  1   11428682 1273266546 10079
## - DistanceFromHome             1   13811550 1275649413 10081
## - TotalWorkingYears            1   60763405 1322601268 10106
## - JobLevel                     1 4369799181 5631637044 11116
## 
## Step:  AIC=10073.52
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + EducationFieldMarketing + EnvironmentSatisfaction + 
##     JobInvolvement + JobLevel + MaritalStatusSingle + NumCompaniesWorked + 
##     PercentSalaryHike + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - Age                          1     784959 1263364501 10072
## - PercentSalaryHike            1    1026937 1263606479 10072
## - Education                    1    1191125 1263770667 10072
## - YearsInCurrentRole           1    1480661 1264060203 10072
## - NumCompaniesWorked           1    1482541 1264062083 10072
## - JobInvolvement               1    2212643 1264792185 10073
## <none>                                      1262579542 10074
## - MaritalStatusSingle          1    3743635 1266323177 10074
## - EnvironmentSatisfaction      1    6748403 1269327945 10075
## - YearsWithCurrManager         1    9051528 1271631070 10076
## - EducationFieldMarketing      1    9988208 1272567749 10077
## - BusinessTravelTravel_Rarely  1   11525033 1274104575 10078
## - DistanceFromHome             1   13435396 1276014938 10079
## - TotalWorkingYears            1   60486452 1323065994 10104
## - JobLevel                     1 4369088110 5631667651 11114
## 
## Step:  AIC=10071.95
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     EducationFieldMarketing + EnvironmentSatisfaction + JobInvolvement + 
##     JobLevel + MaritalStatusSingle + NumCompaniesWorked + PercentSalaryHike + 
##     TotalWorkingYears + YearsInCurrentRole + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - Education                    1     920995 1264285496 10070
## - PercentSalaryHike            1     972879 1264337380 10070
## - YearsInCurrentRole           1    1346986 1264711487 10071
## - NumCompaniesWorked           1    1690616 1265055117 10071
## - JobInvolvement               1    2182933 1265547434 10071
## - MaritalStatusSingle          1    3539155 1266903656 10072
## <none>                                      1263364501 10072
## - EnvironmentSatisfaction      1    6918550 1270283051 10074
## - YearsWithCurrManager         1    8733943 1272098444 10075
## - EducationFieldMarketing      1   10214511 1273579012 10076
## - BusinessTravelTravel_Rarely  1   11663820 1275028321 10076
## - DistanceFromHome             1   13301660 1276666161 10077
## - TotalWorkingYears            1   70846924 1334211425 10108
## - JobLevel                     1 4394718461 5658082962 11115
## 
## Step:  AIC=10070.46
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + MaritalStatusSingle + 
##     NumCompaniesWorked + PercentSalaryHike + TotalWorkingYears + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - PercentSalaryHike            1     971190 1265256686 10069
## - NumCompaniesWorked           1    1354451 1265639947 10069
## - YearsInCurrentRole           1    1453896 1265739392 10069
## - JobInvolvement               1    2296855 1266582351 10070
## - MaritalStatusSingle          1    3580943 1267866439 10070
## <none>                                      1264285496 10070
## - EnvironmentSatisfaction      1    7096839 1271382335 10072
## - YearsWithCurrManager         1    8363315 1272648811 10073
## - EducationFieldMarketing      1    9796922 1274082418 10074
## - BusinessTravelTravel_Rarely  1   11905127 1276190623 10075
## - DistanceFromHome             1   12847372 1277132867 10076
## - TotalWorkingYears            1   71669347 1335954843 10107
## - JobLevel                     1 4397339772 5661625268 11113
## 
## Step:  AIC=10068.99
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + MaritalStatusSingle + 
##     NumCompaniesWorked + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - YearsInCurrentRole           1    1355263 1266611949 10068
## - NumCompaniesWorked           1    1380057 1266636743 10068
## - JobInvolvement               1    2317326 1267574012 10068
## - MaritalStatusSingle          1    3539899 1268796585 10069
## <none>                                      1265256686 10069
## - EnvironmentSatisfaction      1    7098303 1272354989 10071
## - YearsWithCurrManager         1    8517710 1273774396 10072
## - EducationFieldMarketing      1   10050998 1275307685 10072
## - BusinessTravelTravel_Rarely  1   11963498 1277220184 10074
## - DistanceFromHome             1   12637193 1277893880 10074
## - TotalWorkingYears            1   71473348 1336730034 10105
## - JobLevel                     1 4398364657 5663621343 11112
## 
## Step:  AIC=10067.74
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + MaritalStatusSingle + 
##     NumCompaniesWorked + TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - NumCompaniesWorked           1    1082484 1267694433 10066
## - JobInvolvement               1    2355682 1268967631 10067
## - MaritalStatusSingle          1    3186138 1269798087 10068
## <none>                                      1266611949 10068
## - EnvironmentSatisfaction      1    7545788 1274157737 10070
## - EducationFieldMarketing      1   10220126 1276832075 10071
## - BusinessTravelTravel_Rarely  1   11674050 1278286000 10072
## - DistanceFromHome             1   12647801 1279259751 10073
## - YearsWithCurrManager         1   20421351 1287033300 10077
## - TotalWorkingYears            1   70383534 1336995483 10103
## - JobLevel                     1 4402354994 5668966943 11110
## 
## Step:  AIC=10066.34
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + MaritalStatusSingle + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - JobInvolvement               1    2337368 1270031802 10066
## - MaritalStatusSingle          1    3248206 1270942639 10066
## <none>                                      1267694433 10066
## - EnvironmentSatisfaction      1    7591236 1275285669 10068
## - EducationFieldMarketing      1    9965185 1277659618 10070
## - BusinessTravelTravel_Rarely  1   11930476 1279624909 10071
## - DistanceFromHome             1   12147941 1279842375 10071
## - YearsWithCurrManager         1   19395880 1287090313 10075
## - TotalWorkingYears            1   71545683 1339240116 10103
## - JobLevel                     1 4413691712 5681386146 11110
## 
## Step:  AIC=10065.62
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobLevel + MaritalStatusSingle + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## <none>                                      1270031802 10066
## - MaritalStatusSingle          1    3693498 1273725300 10066
## - EnvironmentSatisfaction      1    7808193 1277839995 10068
## - EducationFieldMarketing      1   10073371 1280105173 10069
## - BusinessTravelTravel_Rarely  1   11996636 1282028438 10070
## - DistanceFromHome             1   12134907 1282166709 10070
## - YearsWithCurrManager         1   18798724 1288830526 10074
## - TotalWorkingYears            1   70978156 1341009958 10102
## - JobLevel                     1 4416390768 5686422570 11108
## Start:  AIC=10128.1
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Age                               1         79 1315433923 10126
## - NumCompaniesWorked                1      77331 1315511175 10126
## - BusinessTravelTravel_Frequently   1      84397 1315518241 10126
## - OverTimeYes                       1      99794 1315533638 10126
## - JobSatisfaction                   1     115281 1315549124 10126
## - RelationshipSatisfaction          1     125007 1315558850 10126
## - MaritalStatusSingle               1     131559 1315565403 10126
## - PercentSalaryHike                 1     583986 1316017830 10126
## - YearsAtCompany                    1     633032 1316066875 10126
## - TrainingTimesLastYear             1    1012914 1316446757 10127
## - YearsSinceLastPromotion           1    1226843 1316660687 10127
## - EducationFieldMedical             1    1230568 1316664411 10127
## - EducationFieldOther               1    1243886 1316677729 10127
## - YearsInCurrentRole                1    1313977 1316747821 10127
## - GenderMale                        1    1345159 1316779002 10127
## - `EducationFieldLife Sciences`     1    1514457 1316948301 10127
## - Education                         1    1694283 1317128127 10127
## - `EducationFieldTechnical Degree`  1    1725635 1317159479 10127
## - EnvironmentSatisfaction           1    3297088 1318730932 10128
## - MaritalStatusMarried              1    3420843 1318854686 10128
## - JobInvolvement                    1    3554346 1318988189 10128
## <none>                                           1315433843 10128
## - BusinessTravelTravel_Rarely       1    7085998 1322519841 10130
## - EducationFieldMarketing           1    7173545 1322607388 10130
## - DistanceFromHome                  1    7353989 1322787832 10130
## - YearsWithCurrManager              1   10632490 1326066333 10132
## - TotalWorkingYears                 1   24719947 1340153791 10139
## - JobLevel                          1 4193980406 5509414249 11124
## 
## Step:  AIC=10126.1
## .outcome ~ BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - NumCompaniesWorked                1      77385 1315511308 10124
## - BusinessTravelTravel_Frequently   1      84322 1315518244 10124
## - OverTimeYes                       1      99732 1315533654 10124
## - JobSatisfaction                   1     115203 1315549126 10124
## - RelationshipSatisfaction          1     124980 1315558902 10124
## - MaritalStatusSingle               1     131676 1315565599 10124
## - PercentSalaryHike                 1     584326 1316018249 10124
## - YearsAtCompany                    1     634565 1316068488 10124
## - TrainingTimesLastYear             1    1012917 1316446840 10125
## - YearsSinceLastPromotion           1    1227305 1316661228 10125
## - EducationFieldMedical             1    1230489 1316664412 10125
## - EducationFieldOther               1    1244401 1316678324 10125
## - YearsInCurrentRole                1    1314023 1316747946 10125
## - GenderMale                        1    1345360 1316779283 10125
## - `EducationFieldLife Sciences`     1    1515308 1316949230 10125
## - `EducationFieldTechnical Degree`  1    1725952 1317159875 10125
## - Education                         1    1745966 1317179889 10125
## - EnvironmentSatisfaction           1    3297262 1318731185 10126
## - MaritalStatusMarried              1    3420891 1318854814 10126
## - JobInvolvement                    1    3558453 1318992376 10126
## <none>                                           1315433923 10126
## - BusinessTravelTravel_Rarely       1    7089637 1322523560 10128
## - EducationFieldMarketing           1    7177621 1322611544 10128
## - DistanceFromHome                  1    7362068 1322795990 10128
## - YearsWithCurrManager              1   10669303 1326103225 10130
## - TotalWorkingYears                 1   32932077 1348365999 10141
## - JobLevel                          1 4220220605 5535654527 11126
## 
## Step:  AIC=10124.14
## .outcome ~ BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - BusinessTravelTravel_Frequently   1      90015 1315601323 10122
## - OverTimeYes                       1     107108 1315618416 10122
## - JobSatisfaction                   1     107248 1315618555 10122
## - RelationshipSatisfaction          1     112005 1315623313 10122
## - MaritalStatusSingle               1     129725 1315641033 10122
## - PercentSalaryHike                 1     593522 1316104830 10122
## - YearsAtCompany                    1     809862 1316321169 10123
## - TrainingTimesLastYear             1    1043847 1316555155 10123
## - EducationFieldOther               1    1245791 1316757099 10123
## - YearsSinceLastPromotion           1    1248988 1316760296 10123
## - EducationFieldMedical             1    1255524 1316766831 10123
## - YearsInCurrentRole                1    1338056 1316849364 10123
## - GenderMale                        1    1348474 1316859782 10123
## - `EducationFieldLife Sciences`     1    1535682 1317046990 10123
## - Education                         1    1677989 1317189297 10123
## - `EducationFieldTechnical Degree`  1    1742497 1317253804 10123
## - EnvironmentSatisfaction           1    3324440 1318835748 10124
## - MaritalStatusMarried              1    3424540 1318935848 10124
## - JobInvolvement                    1    3613983 1319125291 10124
## <none>                                           1315511308 10124
## - BusinessTravelTravel_Rarely       1    7150599 1322661907 10126
## - EducationFieldMarketing           1    7205894 1322717202 10126
## - DistanceFromHome                  1    7285242 1322796550 10126
## - YearsWithCurrManager              1   10681890 1326193198 10128
## - TotalWorkingYears                 1   37591654 1353102962 10142
## - JobLevel                          1 4284057157 5599568465 11132
## 
## Step:  AIC=10122.19
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     JobSatisfaction + MaritalStatusMarried + MaritalStatusSingle + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - JobSatisfaction                   1      95338 1315696661 10120
## - OverTimeYes                       1     100136 1315701458 10120
## - RelationshipSatisfaction          1     118030 1315719353 10120
## - MaritalStatusSingle               1     153318 1315754641 10120
## - PercentSalaryHike                 1     583568 1316184891 10120
## - YearsAtCompany                    1     805804 1316407127 10121
## - TrainingTimesLastYear             1    1098636 1316699959 10121
## - EducationFieldOther               1    1240943 1316842266 10121
## - YearsSinceLastPromotion           1    1250291 1316851614 10121
## - EducationFieldMedical             1    1262722 1316864045 10121
## - YearsInCurrentRole                1    1314861 1316916184 10121
## - GenderMale                        1    1322660 1316923983 10121
## - `EducationFieldLife Sciences`     1    1536219 1317137541 10121
## - Education                         1    1691323 1317292645 10121
## - `EducationFieldTechnical Degree`  1    1750710 1317352032 10121
## - EnvironmentSatisfaction           1    3292279 1318893602 10122
## - MaritalStatusMarried              1    3522645 1319123968 10122
## - JobInvolvement                    1    3763167 1319364490 10122
## <none>                                           1315601323 10122
## - EducationFieldMarketing           1    7196400 1322797722 10124
## - DistanceFromHome                  1    7310224 1322911546 10124
## - YearsWithCurrManager              1   10712611 1326313934 10126
## - BusinessTravelTravel_Rarely       1   13371083 1328972405 10127
## - TotalWorkingYears                 1   37718484 1353319807 10140
## - JobLevel                          1 4284117932 5599719254 11130
## 
## Step:  AIC=10120.24
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - OverTimeYes                       1     109237 1315805897 10118
## - RelationshipSatisfaction          1     120110 1315816770 10118
## - MaritalStatusSingle               1     142635 1315839296 10118
## - PercentSalaryHike                 1     579546 1316276206 10118
## - YearsAtCompany                    1     774695 1316471356 10119
## - TrainingTimesLastYear             1    1122172 1316818833 10119
## - EducationFieldOther               1    1271080 1316967741 10119
## - GenderMale                        1    1281747 1316978408 10119
## - YearsSinceLastPromotion           1    1292689 1316989349 10119
## - EducationFieldMedical             1    1299625 1316996285 10119
## - YearsInCurrentRole                1    1327224 1317023885 10119
## - `EducationFieldLife Sciences`     1    1572067 1317268728 10119
## - Education                         1    1667405 1317364066 10119
## - `EducationFieldTechnical Degree`  1    1758503 1317455163 10119
## - EnvironmentSatisfaction           1    3265920 1318962581 10120
## - MaritalStatusMarried              1    3458902 1319155562 10120
## <none>                                           1315696661 10120
## - JobInvolvement                    1    3846163 1319542824 10120
## - DistanceFromHome                  1    7230962 1322927622 10122
## - EducationFieldMarketing           1    7287316 1322983976 10122
## - YearsWithCurrManager              1   10687928 1326384588 10124
## - BusinessTravelTravel_Rarely       1   13574590 1329271251 10125
## - TotalWorkingYears                 1   38052843 1353749504 10138
## - JobLevel                          1 4285840020 5601536681 11128
## 
## Step:  AIC=10118.3
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - RelationshipSatisfaction          1     119185 1315925082 10116
## - MaritalStatusSingle               1     138007 1315943905 10116
## - PercentSalaryHike                 1     579927 1316385824 10117
## - YearsAtCompany                    1     749566 1316555463 10117
## - TrainingTimesLastYear             1    1187055 1316992953 10117
## - YearsSinceLastPromotion           1    1274776 1317080673 10117
## - GenderMale                        1    1303766 1317109663 10117
## - EducationFieldOther               1    1313201 1317119098 10117
## - YearsInCurrentRole                1    1313773 1317119670 10117
## - EducationFieldMedical             1    1322792 1317128690 10117
## - `EducationFieldLife Sciences`     1    1594782 1317400680 10117
## - Education                         1    1686970 1317492868 10117
## - `EducationFieldTechnical Degree`  1    1759176 1317565073 10117
## - EnvironmentSatisfaction           1    3348500 1319154397 10118
## - MaritalStatusMarried              1    3498120 1319304017 10118
## <none>                                           1315805897 10118
## - JobInvolvement                    1    3881121 1319687018 10118
## - EducationFieldMarketing           1    7352489 1323158387 10120
## - DistanceFromHome                  1    7373332 1323179230 10120
## - YearsWithCurrManager              1   10602247 1326408145 10122
## - BusinessTravelTravel_Rarely       1   13545504 1329351402 10123
## - TotalWorkingYears                 1   38052113 1353858010 10136
## - JobLevel                          1 4292930301 5608736198 11127
## 
## Step:  AIC=10116.36
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + PercentSalaryHike + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusSingle               1     138488 1316063570 10114
## - PercentSalaryHike                 1     557118 1316482200 10115
## - YearsAtCompany                    1     768378 1316693460 10115
## - TrainingTimesLastYear             1    1184116 1317109198 10115
## - YearsSinceLastPromotion           1    1273134 1317198216 10115
## - GenderMale                        1    1291432 1317216514 10115
## - YearsInCurrentRole                1    1292851 1317217933 10115
## - EducationFieldMedical             1    1345905 1317270987 10115
## - EducationFieldOther               1    1355720 1317280802 10115
## - `EducationFieldLife Sciences`     1    1644463 1317569545 10115
## - Education                         1    1667399 1317592481 10115
## - `EducationFieldTechnical Degree`  1    1813951 1317739033 10115
## - EnvironmentSatisfaction           1    3347565 1319272647 10116
## - MaritalStatusMarried              1    3433508 1319358590 10116
## <none>                                           1315925082 10116
## - JobInvolvement                    1    3985911 1319910993 10116
## - DistanceFromHome                  1    7315201 1323240283 10118
## - EducationFieldMarketing           1    7446134 1323371216 10118
## - YearsWithCurrManager              1   10734211 1326659293 10120
## - BusinessTravelTravel_Rarely       1   13462506 1329387588 10122
## - TotalWorkingYears                 1   37975717 1353900799 10134
## - JobLevel                          1 4294364239 5610289321 11125
## 
## Step:  AIC=10114.43
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + PercentSalaryHike + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - PercentSalaryHike                 1     558887 1316622457 10113
## - YearsAtCompany                    1     780210 1316843780 10113
## - TrainingTimesLastYear             1    1175669 1317239239 10113
## - GenderMale                        1    1232505 1317296075 10113
## - YearsSinceLastPromotion           1    1261226 1317324796 10113
## - EducationFieldMedical             1    1326713 1317390283 10113
## - EducationFieldOther               1    1326863 1317390433 10113
## - YearsInCurrentRole                1    1338827 1317402397 10113
## - `EducationFieldLife Sciences`     1    1613914 1317677483 10113
## - Education                         1    1679778 1317743348 10113
## - `EducationFieldTechnical Degree`  1    1781618 1317845188 10113
## - EnvironmentSatisfaction           1    3412419 1319475989 10114
## <none>                                           1316063570 10114
## - JobInvolvement                    1    3907058 1319970628 10114
## - MaritalStatusMarried              1    4200549 1320264119 10115
## - DistanceFromHome                  1    7376811 1323440381 10116
## - EducationFieldMarketing           1    7380216 1323443786 10116
## - YearsWithCurrManager              1   10657146 1326720716 10118
## - BusinessTravelTravel_Rarely       1   13496953 1329560523 10120
## - TotalWorkingYears                 1   37846318 1353909888 10132
## - JobLevel                          1 4294258817 5610322386 11123
## 
## Step:  AIC=10112.73
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsAtCompany                    1     772087 1317394544 10111
## - TrainingTimesLastYear             1    1182606 1317805063 10111
## - YearsSinceLastPromotion           1    1189756 1317812214 10111
## - GenderMale                        1    1267383 1317889840 10111
## - EducationFieldOther               1    1270235 1317892692 10111
## - YearsInCurrentRole                1    1279510 1317901967 10111
## - EducationFieldMedical             1    1282678 1317905135 10111
## - `EducationFieldLife Sciences`     1    1572031 1318194488 10112
## - Education                         1    1766807 1318389265 10112
## - `EducationFieldTechnical Degree`  1    1816460 1318438918 10112
## - EnvironmentSatisfaction           1    3403630 1320026087 10112
## <none>                                           1316622457 10113
## - JobInvolvement                    1    3885522 1320507979 10113
## - MaritalStatusMarried              1    4157836 1320780293 10113
## - DistanceFromHome                  1    7207713 1323830170 10114
## - EducationFieldMarketing           1    7434764 1324057221 10115
## - YearsWithCurrManager              1   10727046 1327349503 10116
## - BusinessTravelTravel_Rarely       1   13341428 1329963885 10118
## - TotalWorkingYears                 1   37745502 1354367959 10130
## - JobLevel                          1 4296036589 5612659046 11121
## 
## Step:  AIC=10111.14
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsInCurrentRole                1     714484 1318109027 10110
## - TrainingTimesLastYear             1    1342862 1318737405 10110
## - GenderMale                        1    1343431 1318737975 10110
## - EducationFieldMedical             1    1365908 1318760452 10110
## - EducationFieldOther               1    1394274 1318788818 10110
## - Education                         1    1587101 1318981645 10110
## - `EducationFieldLife Sciences`     1    1715587 1319110131 10110
## - YearsSinceLastPromotion           1    1948786 1319343330 10110
## - `EducationFieldTechnical Degree`  1    1990705 1319385249 10110
## - EnvironmentSatisfaction           1    3511256 1320905800 10111
## - JobInvolvement                    1    3611242 1321005786 10111
## <none>                                           1317394544 10111
## - MaritalStatusMarried              1    4046203 1321440746 10111
## - DistanceFromHome                  1    7336347 1324730891 10113
## - EducationFieldMarketing           1    7670967 1325065510 10113
## - YearsWithCurrManager              1   10353951 1327748495 10115
## - BusinessTravelTravel_Rarely       1   13392315 1330786858 10116
## - TotalWorkingYears                 1   41612865 1359007409 10131
## - JobLevel                          1 4374878644 5692273187 11129
## 
## Step:  AIC=10109.52
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - TrainingTimesLastYear             1    1364320 1319473347 10108
## - EducationFieldMedical             1    1370440 1319479468 10108
## - EducationFieldOther               1    1412386 1319521414 10108
## - GenderMale                        1    1460120 1319569147 10108
## - YearsSinceLastPromotion           1    1474512 1319583540 10108
## - Education                         1    1667399 1319776426 10108
## - `EducationFieldLife Sciences`     1    1725967 1319834994 10108
## - `EducationFieldTechnical Degree`  1    2051481 1320160508 10109
## - JobInvolvement                    1    3497339 1321606367 10109
## - EnvironmentSatisfaction           1    3712186 1321821213 10110
## <none>                                           1318109027 10110
## - MaritalStatusMarried              1    3843408 1321952435 10110
## - DistanceFromHome                  1    7385585 1325494612 10111
## - EducationFieldMarketing           1    7710118 1325819146 10112
## - BusinessTravelTravel_Rarely       1   13260505 1331369532 10114
## - YearsWithCurrManager              1   19199123 1337308151 10118
## - TotalWorkingYears                 1   40928703 1359037731 10129
## - JobLevel                          1 4377556676 5695665703 11128
## 
## Step:  AIC=10108.24
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsSinceLastPromotion           1    1254418 1320727765 10107
## - EducationFieldMedical             1    1258747 1320732094 10107
## - EducationFieldOther               1    1342751 1320816098 10107
## - GenderMale                        1    1538413 1321011760 10107
## - Education                         1    1548938 1321022286 10107
## - `EducationFieldLife Sciences`     1    1691824 1321165171 10107
## - `EducationFieldTechnical Degree`  1    1945387 1321418734 10107
## - JobInvolvement                    1    3455935 1322929282 10108
## - MaritalStatusMarried              1    3667416 1323140763 10108
## <none>                                           1319473347 10108
## - EnvironmentSatisfaction           1    3801548 1323274895 10108
## - EducationFieldMarketing           1    7596837 1327070184 10110
## - DistanceFromHome                  1    7705950 1327179297 10110
## - BusinessTravelTravel_Rarely       1   13098963 1332572310 10113
## - YearsWithCurrManager              1   18686355 1338159702 10116
## - TotalWorkingYears                 1   40946288 1360419635 10128
## - JobLevel                          1 4376193922 5695667269 11126
## 
## Step:  AIC=10106.9
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldMedical             1    1132813 1321860578 10106
## - EducationFieldOther               1    1258061 1321985826 10106
## - `EducationFieldLife Sciences`     1    1565894 1322293659 10106
## - Education                         1    1581003 1322308768 10106
## - GenderMale                        1    1645781 1322373546 10106
## - `EducationFieldTechnical Degree`  1    1731136 1322458901 10106
## - JobInvolvement                    1    3336181 1324063946 10107
## - EnvironmentSatisfaction           1    3655700 1324383465 10107
## <none>                                           1320727765 10107
## - MaritalStatusMarried              1    3883201 1324610966 10107
## - EducationFieldMarketing           1    7401912 1328129676 10109
## - DistanceFromHome                  1    7880441 1328608205 10109
## - BusinessTravelTravel_Rarely       1   12661562 1333389326 10112
## - YearsWithCurrManager              1   17781233 1338508998 10114
## - TotalWorkingYears                 1   45204793 1365932557 10128
## - JobLevel                          1 4376157326 5696885090 11124
## 
## Step:  AIC=10105.5
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldOther               1     181466 1322042044 10104
## - `EducationFieldLife Sciences`     1     548770 1322409348 10104
## - `EducationFieldTechnical Degree`  1     621729 1322482307 10104
## - Education                         1    1617879 1323478457 10104
## - GenderMale                        1    1755030 1323615608 10104
## - JobInvolvement                    1    3366601 1325227179 10105
## - EnvironmentSatisfaction           1    3583920 1325444498 10105
## <none>                                           1321860578 10106
## - MaritalStatusMarried              1    4302786 1326163364 10106
## - DistanceFromHome                  1    8099152 1329959730 10108
## - BusinessTravelTravel_Rarely       1   12520369 1334380947 10110
## - EducationFieldMarketing           1   14251472 1336112050 10111
## - YearsWithCurrManager              1   18267892 1340128470 10113
## - TotalWorkingYears                 1   45120328 1366980906 10127
## - JobLevel                          1 4381634042 5703494620 11122
## 
## Step:  AIC=10103.59
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldLife Sciences`     1     412280 1322454324 10102
## - `EducationFieldTechnical Degree`  1     517898 1322559943 10102
## - Education                         1    1587028 1323629073 10102
## - GenderMale                        1    1739599 1323781643 10102
## - JobInvolvement                    1    3379415 1325421459 10103
## - EnvironmentSatisfaction           1    3681616 1325723661 10104
## <none>                                           1322042044 10104
## - MaritalStatusMarried              1    4289007 1326331051 10104
## - DistanceFromHome                  1    8067141 1330109186 10106
## - BusinessTravelTravel_Rarely       1   12530417 1334572461 10108
## - EducationFieldMarketing           1   14193532 1336235577 10109
## - YearsWithCurrManager              1   18173209 1340215253 10111
## - TotalWorkingYears                 1   45437104 1367479148 10125
## - JobLevel                          1 4383680085 5705722130 11121
## 
## Step:  AIC=10101.81
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     EducationFieldMarketing + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldTechnical Degree`  1     295694 1322750018 10100
## - Education                         1    1589438 1324043762 10101
## - GenderMale                        1    1779904 1324234228 10101
## - JobInvolvement                    1    3268102 1325722426 10102
## - EnvironmentSatisfaction           1    3646535 1326100859 10102
## <none>                                           1322454324 10102
## - MaritalStatusMarried              1    4288232 1326742556 10102
## - DistanceFromHome                  1    7853096 1330307420 10104
## - BusinessTravelTravel_Rarely       1   12348314 1334802638 10106
## - EducationFieldMarketing           1   14232422 1336686746 10107
## - YearsWithCurrManager              1   18103829 1340558153 10109
## - TotalWorkingYears                 1   45638106 1368092430 10124
## - JobLevel                          1 4383397712 5705852036 11119
## 
## Step:  AIC=10099.97
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     EducationFieldMarketing + EnvironmentSatisfaction + GenderMale + 
##     JobInvolvement + JobLevel + MaritalStatusMarried + TotalWorkingYears + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - Education                    1    1567465 1324317483 10099
## - GenderMale                   1    1771445 1324521463 10099
## - JobInvolvement               1    3288179 1326038197 10100
## - EnvironmentSatisfaction      1    3760830 1326510848 10100
## <none>                                      1322750018 10100
## - MaritalStatusMarried         1    4187934 1326937952 10100
## - DistanceFromHome             1    7688742 1330438760 10102
## - BusinessTravelTravel_Rarely  1   12443687 1335193705 10104
## - EducationFieldMarketing      1   13959090 1336709108 10105
## - YearsWithCurrManager         1   18181520 1340931538 10108
## - TotalWorkingYears            1   45961314 1368711332 10122
## - JobLevel                     1 4383396278 5706146296 11117
## 
## Step:  AIC=10098.79
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - GenderMale                   1    1702074 1326019557 10098
## - JobInvolvement               1    3595316 1327912799 10099
## <none>                                      1324317483 10099
## - EnvironmentSatisfaction      1    3925162 1328242645 10099
## - MaritalStatusMarried         1    4096687 1328414170 10099
## - DistanceFromHome             1    7558736 1331876220 10101
## - BusinessTravelTravel_Rarely  1   12649593 1336967076 10103
## - EducationFieldMarketing      1   13200874 1337518358 10104
## - YearsWithCurrManager         1   18404445 1342721929 10106
## - TotalWorkingYears            1   47462006 1371779490 10121
## - JobLevel                     1 4387860184 5712177667 11116
## 
## Step:  AIC=10097.69
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## <none>                                      1326019557 10098
## - EnvironmentSatisfaction      1    3815596 1329835154 10098
## - JobInvolvement               1    3871268 1329890825 10098
## - MaritalStatusMarried         1    3889108 1329908666 10098
## - DistanceFromHome             1    7553763 1333573320 10100
## - BusinessTravelTravel_Rarely  1   12505839 1338525396 10102
## - EducationFieldMarketing      1   13598473 1339618030 10103
## - YearsWithCurrManager         1   19268643 1345288200 10106
## - TotalWorkingYears            1   47646790 1373666347 10120
## - JobLevel                     1 4387637719 5713657276 11114
## Start:  AIC=10032.34
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsSinceLastPromotion           1      36613 1214542764 10030
## - TrainingTimesLastYear             1     161038 1214667189 10030
## - BusinessTravelTravel_Frequently   1     293960 1214800111 10030
## - Education                         1     303729 1214809880 10030
## - Age                               1     310531 1214816682 10030
## - PercentSalaryHike                 1     438117 1214944268 10031
## - MaritalStatusSingle               1     462023 1214968174 10031
## - JobSatisfaction                   1     486660 1214992811 10031
## - YearsAtCompany                    1     623204 1215129355 10031
## - YearsInCurrentRole                1     639514 1215145666 10031
## - RelationshipSatisfaction          1     645321 1215151472 10031
## - NumCompaniesWorked                1     718101 1215224252 10031
## - EnvironmentSatisfaction           1     859629 1215365780 10031
## - OverTimeYes                       1    1010145 1215516296 10031
## - GenderMale                        1    1087795 1215593946 10031
## - MaritalStatusMarried              1    2046769 1216552920 10032
## - `EducationFieldTechnical Degree`  1    2622935 1217129086 10032
## - EducationFieldOther               1    3219939 1217726090 10032
## - EducationFieldMedical             1    3265821 1217771972 10032
## <none>                                           1214506151 10032
## - `EducationFieldLife Sciences`     1    4088584 1218594735 10033
## - JobInvolvement                    1    4483613 1218989764 10033
## - BusinessTravelTravel_Rarely       1    5128985 1219635136 10033
## - YearsWithCurrManager              1    7318132 1221824283 10034
## - EducationFieldMarketing           1    7519410 1222025561 10035
## - DistanceFromHome                  1   11985838 1226491989 10037
## - TotalWorkingYears                 1   43819406 1258325557 10055
## - JobLevel                          1 4338388549 5552894700 11085
## 
## Step:  AIC=10030.36
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - TrainingTimesLastYear             1     151053 1214693817 10028
## - BusinessTravelTravel_Frequently   1     290220 1214832984 10028
## - Education                         1     297257 1214840021 10028
## - Age                               1     308505 1214851270 10028
## - PercentSalaryHike                 1     424178 1214966942 10029
## - MaritalStatusSingle               1     465236 1215008000 10029
## - JobSatisfaction                   1     471765 1215014529 10029
## - YearsAtCompany                    1     590493 1215133257 10029
## - YearsInCurrentRole                1     620522 1215163286 10029
## - RelationshipSatisfaction          1     663537 1215206301 10029
## - NumCompaniesWorked                1     739073 1215281837 10029
## - EnvironmentSatisfaction           1     845256 1215388020 10029
## - OverTimeYes                       1    1014595 1215557359 10029
## - GenderMale                        1    1090426 1215633190 10029
## - MaritalStatusMarried              1    2061000 1216603764 10030
## - `EducationFieldTechnical Degree`  1    2588343 1217131107 10030
## - EducationFieldOther               1    3195006 1217737770 10030
## - EducationFieldMedical             1    3232536 1217775300 10030
## <none>                                           1214542764 10030
## - `EducationFieldLife Sciences`     1    4056563 1218599327 10031
## - JobInvolvement                    1    4455963 1218998727 10031
## - BusinessTravelTravel_Rarely       1    5106193 1219648957 10031
## - YearsWithCurrManager              1    7372465 1221915229 10033
## - EducationFieldMarketing           1    7483067 1222025831 10033
## - DistanceFromHome                  1   12032791 1226575555 10035
## - TotalWorkingYears                 1   44155388 1258698152 10053
## - JobLevel                          1 4345171857 5559714621 11084
## 
## Step:  AIC=10028.45
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - BusinessTravelTravel_Frequently   1     264165 1214957982 10027
## - Education                         1     301308 1214995125 10027
## - Age                               1     310958 1215004775 10027
## - PercentSalaryHike                 1     421411 1215115228 10027
## - JobSatisfaction                   1     431683 1215125500 10027
## - MaritalStatusSingle               1     445706 1215139523 10027
## - YearsAtCompany                    1     554041 1215247858 10027
## - YearsInCurrentRole                1     646359 1215340176 10027
## - RelationshipSatisfaction          1     662088 1215355905 10027
## - NumCompaniesWorked                1     759371 1215453188 10027
## - EnvironmentSatisfaction           1     833951 1215527768 10027
## - OverTimeYes                       1    1069522 1215763339 10027
## - GenderMale                        1    1085626 1215779443 10027
## - MaritalStatusMarried              1    2006248 1216700065 10028
## - `EducationFieldTechnical Degree`  1    2565603 1217259420 10028
## - EducationFieldOther               1    3162812 1217856630 10028
## - EducationFieldMedical             1    3174169 1217867986 10028
## <none>                                           1214693817 10028
## - `EducationFieldLife Sciences`     1    4037103 1218730920 10029
## - JobInvolvement                    1    4385430 1219079247 10029
## - BusinessTravelTravel_Rarely       1    5191792 1219885609 10029
## - EducationFieldMarketing           1    7451400 1222145217 10031
## - YearsWithCurrManager              1    7468652 1222162469 10031
## - DistanceFromHome                  1   12119661 1226813478 10033
## - TotalWorkingYears                 1   44065145 1258758962 10051
## - JobLevel                          1 4345756557 5560450374 11082
## 
## Step:  AIC=10026.6
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     JobSatisfaction + MaritalStatusMarried + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Age                               1     285392 1215243374 10025
## - Education                         1     308823 1215266805 10025
## - MaritalStatusSingle               1     392540 1215350522 10025
## - JobSatisfaction                   1     394426 1215352408 10025
## - PercentSalaryHike                 1     423846 1215381828 10025
## - YearsAtCompany                    1     530074 1215488056 10025
## - RelationshipSatisfaction          1     603569 1215561551 10025
## - YearsInCurrentRole                1     638333 1215596315 10025
## - NumCompaniesWorked                1     721764 1215679746 10025
## - EnvironmentSatisfaction           1     836746 1215794728 10025
## - GenderMale                        1    1126832 1216084814 10025
## - OverTimeYes                       1    1131334 1216089316 10025
## - MaritalStatusMarried              1    1941426 1216899408 10026
## - `EducationFieldTechnical Degree`  1    2558938 1217516921 10026
## - EducationFieldOther               1    3137113 1218095095 10026
## - EducationFieldMedical             1    3146093 1218104075 10026
## <none>                                           1214957982 10027
## - `EducationFieldLife Sciences`     1    4019341 1218977323 10027
## - JobInvolvement                    1    4297541 1219255523 10027
## - EducationFieldMarketing           1    7439215 1222397198 10029
## - YearsWithCurrManager              1    7467927 1222425909 10029
## - DistanceFromHome                  1   12024754 1226982736 10031
## - BusinessTravelTravel_Rarely       1   15066041 1230024023 10033
## - TotalWorkingYears                 1   43852953 1258810935 10049
## - JobLevel                          1 4369533313 5584491295 11083
## 
## Step:  AIC=10024.76
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     JobSatisfaction + MaritalStatusMarried + MaritalStatusSingle + 
##     NumCompaniesWorked + OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - JobSatisfaction                   1     371278 1215614652 10023
## - Education                         1     401315 1215644690 10023
## - PercentSalaryHike                 1     419048 1215662422 10023
## - YearsAtCompany                    1     457573 1215700948 10023
## - MaritalStatusSingle               1     458703 1215702077 10023
## - RelationshipSatisfaction          1     591820 1215835194 10023
## - YearsInCurrentRole                1     631414 1215874788 10023
## - NumCompaniesWorked                1     784790 1216028164 10023
## - EnvironmentSatisfaction           1     837202 1216080576 10023
## - GenderMale                        1    1125878 1216369252 10023
## - OverTimeYes                       1    1140897 1216384272 10023
## - MaritalStatusMarried              1    1943505 1217186879 10024
## - `EducationFieldTechnical Degree`  1    2609830 1217853204 10024
## - EducationFieldOther               1    3143025 1218386400 10025
## - EducationFieldMedical             1    3188894 1218432268 10025
## <none>                                           1215243374 10025
## - `EducationFieldLife Sciences`     1    4109462 1219352837 10025
## - JobInvolvement                    1    4233598 1219476972 10025
## - YearsWithCurrManager              1    7368538 1222611912 10027
## - EducationFieldMarketing           1    7563292 1222806666 10027
## - DistanceFromHome                  1   12056658 1227300032 10030
## - BusinessTravelTravel_Rarely       1   15186955 1230430329 10031
## - TotalWorkingYears                 1   54117460 1269360834 10053
## - JobLevel                          1 4393601287 5608844662 11084
## 
## Step:  AIC=10022.97
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + Education + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + YearsAtCompany + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Education                         1     366268 1215980920 10021
## - YearsAtCompany                    1     394733 1216009386 10021
## - PercentSalaryHike                 1     419503 1216034156 10021
## - MaritalStatusSingle               1     483653 1216098305 10021
## - RelationshipSatisfaction          1     559168 1216173820 10021
## - YearsInCurrentRole                1     682095 1216296747 10021
## - NumCompaniesWorked                1     808784 1216423437 10021
## - EnvironmentSatisfaction           1     846615 1216461267 10022
## - OverTimeYes                       1    1098849 1216713501 10022
## - GenderMale                        1    1136028 1216750680 10022
## - MaritalStatusMarried              1    1939034 1217553686 10022
## - `EducationFieldTechnical Degree`  1    2502783 1218117435 10022
## - EducationFieldOther               1    3033678 1218648330 10023
## - EducationFieldMedical             1    3066624 1218681276 10023
## <none>                                           1215614652 10023
## - `EducationFieldLife Sciences`     1    3968196 1219582849 10023
## - JobInvolvement                    1    4102985 1219717638 10023
## - EducationFieldMarketing           1    7404509 1223019161 10025
## - YearsWithCurrManager              1    7417257 1223031910 10025
## - DistanceFromHome                  1   12185340 1227799992 10028
## - BusinessTravelTravel_Rarely       1   14962560 1230577212 10030
## - TotalWorkingYears                 1   53836292 1269450944 10051
## - JobLevel                          1 4394979787 5610594440 11082
## 
## Step:  AIC=10021.18
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     YearsAtCompany + YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsAtCompany                    1     388787 1216369707 10019
## - PercentSalaryHike                 1     412122 1216393042 10019
## - MaritalStatusSingle               1     498586 1216479506 10020
## - RelationshipSatisfaction          1     551441 1216532361 10020
## - YearsInCurrentRole                1     676781 1216657701 10020
## - EnvironmentSatisfaction           1     795283 1216776203 10020
## - NumCompaniesWorked                1    1001546 1216982466 10020
## - OverTimeYes                       1    1027778 1217008698 10020
## - GenderMale                        1    1117524 1217098444 10020
## - MaritalStatusMarried              1    1943296 1217924217 10020
## - `EducationFieldTechnical Degree`  1    2434461 1218415381 10021
## - EducationFieldMedical             1    2961859 1218942779 10021
## - EducationFieldOther               1    2981114 1218962034 10021
## <none>                                           1215980920 10021
## - `EducationFieldLife Sciences`     1    3874772 1219855692 10021
## - JobInvolvement                    1    4063939 1220044859 10022
## - EducationFieldMarketing           1    7376194 1223357114 10023
## - YearsWithCurrManager              1    7785727 1223766647 10024
## - DistanceFromHome                  1   12531723 1228512643 10026
## - BusinessTravelTravel_Rarely       1   14792779 1230773699 10028
## - TotalWorkingYears                 1   53816597 1269797517 10049
## - JobLevel                          1 4397224370 5613205290 11081
## 
## Step:  AIC=10019.41
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - PercentSalaryHike                 1     415136 1216784844 10018
## - RelationshipSatisfaction          1     492727 1216862435 10018
## - MaritalStatusSingle               1     507836 1216877543 10018
## - NumCompaniesWorked                1     738413 1217108120 10018
## - EnvironmentSatisfaction           1     813233 1217182940 10018
## - OverTimeYes                       1    1041533 1217411241 10018
## - GenderMale                        1    1093259 1217462966 10018
## - YearsInCurrentRole                1    1447715 1217817422 10018
## - MaritalStatusMarried              1    1951721 1218321428 10018
## - `EducationFieldTechnical Degree`  1    2348516 1218718224 10019
## - EducationFieldOther               1    2845063 1219214770 10019
## - EducationFieldMedical             1    2907657 1219277365 10019
## <none>                                           1216369707 10019
## - `EducationFieldLife Sciences`     1    3792268 1220161975 10020
## - JobInvolvement                    1    4312261 1220681969 10020
## - EducationFieldMarketing           1    7257953 1223627660 10022
## - YearsWithCurrManager              1   11869664 1228239371 10024
## - DistanceFromHome                  1   12274904 1228644611 10024
## - BusinessTravelTravel_Rarely       1   15028279 1231397987 10026
## - TotalWorkingYears                 1   59213975 1275583682 10050
## - JobLevel                          1 4397021287 5613390995 11079
## 
## Step:  AIC=10017.64
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     RelationshipSatisfaction + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - RelationshipSatisfaction          1     438503 1217223347 10016
## - MaritalStatusSingle               1     530183 1217315027 10016
## - NumCompaniesWorked                1     729432 1217514276 10016
## - EnvironmentSatisfaction           1     814559 1217599402 10016
## - OverTimeYes                       1    1044575 1217829419 10016
## - GenderMale                        1    1091656 1217876500 10016
## - YearsInCurrentRole                1    1385695 1218170539 10016
## - MaritalStatusMarried              1    1921439 1218706283 10017
## - `EducationFieldTechnical Degree`  1    2336906 1219121750 10017
## - EducationFieldOther               1    2764608 1219549452 10017
## - EducationFieldMedical             1    2808991 1219593835 10017
## <none>                                           1216784844 10018
## - `EducationFieldLife Sciences`     1    3689553 1220474397 10018
## - JobInvolvement                    1    4414165 1221199009 10018
## - EducationFieldMarketing           1    7171719 1223956563 10020
## - DistanceFromHome                  1   12071264 1228856108 10022
## - YearsWithCurrManager              1   12229816 1229014659 10023
## - BusinessTravelTravel_Rarely       1   15137366 1231922209 10024
## - TotalWorkingYears                 1   59000375 1275785219 10048
## - JobLevel                          1 4397278702 5614063546 11077
## 
## Step:  AIC=10015.89
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     TotalWorkingYears + YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusSingle               1     563712 1217787058 10014
## - NumCompaniesWorked                1     651863 1217875210 10014
## - EnvironmentSatisfaction           1     819488 1218042835 10014
## - OverTimeYes                       1     995772 1218219119 10014
## - GenderMale                        1    1072539 1218295886 10014
## - YearsInCurrentRole                1    1306174 1218529521 10015
## - MaritalStatusMarried              1    1890830 1219114177 10015
## - `EducationFieldTechnical Degree`  1    2403956 1219627303 10015
## - EducationFieldMedical             1    2822015 1220045361 10016
## - EducationFieldOther               1    2832698 1220056044 10016
## <none>                                           1217223347 10016
## - `EducationFieldLife Sciences`     1    3764744 1220988091 10016
## - JobInvolvement                    1    4437578 1221660925 10016
## - EducationFieldMarketing           1    7185894 1224409241 10018
## - DistanceFromHome                  1   11847966 1229071313 10021
## - YearsWithCurrManager              1   12314844 1229538191 10021
## - BusinessTravelTravel_Rarely       1   14938420 1232161767 10022
## - TotalWorkingYears                 1   58605677 1275829024 10046
## - JobLevel                          1 4402818278 5620041625 11076
## 
## Step:  AIC=10014.21
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + OverTimeYes + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - NumCompaniesWorked                1     649517 1218436576 10013
## - EnvironmentSatisfaction           1     880659 1218667718 10013
## - GenderMale                        1     964234 1218751292 10013
## - OverTimeYes                       1    1036273 1218823331 10013
## - MaritalStatusMarried              1    1343194 1219130252 10013
## - YearsInCurrentRole                1    1453104 1219240162 10013
## - `EducationFieldTechnical Degree`  1    2306577 1220093635 10014
## - EducationFieldMedical             1    2717513 1220504571 10014
## - EducationFieldOther               1    2722875 1220509933 10014
## <none>                                           1217787058 10014
## - `EducationFieldLife Sciences`     1    3637264 1221424322 10014
## - JobInvolvement                    1    4289012 1222076071 10015
## - EducationFieldMarketing           1    7043638 1224830696 10016
## - DistanceFromHome                  1   11889403 1229676461 10019
## - YearsWithCurrManager              1   12089719 1229876777 10019
## - BusinessTravelTravel_Rarely       1   14925092 1232712151 10021
## - TotalWorkingYears                 1   58260055 1276047114 10045
## - JobLevel                          1 4403647875 5621434933 11074
## 
## Step:  AIC=10012.58
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     OverTimeYes + TotalWorkingYears + YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EnvironmentSatisfaction           1     910652 1219347228 10011
## - GenderMale                        1     969547 1219406123 10011
## - OverTimeYes                       1    1043362 1219479938 10011
## - YearsInCurrentRole                1    1213012 1219649588 10011
## - MaritalStatusMarried              1    1334566 1219771141 10011
## - `EducationFieldTechnical Degree`  1    2406288 1220842864 10012
## - EducationFieldOther               1    2804048 1221240623 10012
## - EducationFieldMedical             1    2826516 1221263092 10012
## <none>                                           1218436576 10013
## - `EducationFieldLife Sciences`     1    3774692 1222211267 10013
## - JobInvolvement                    1    4218485 1222655061 10013
## - EducationFieldMarketing           1    7205651 1225642227 10015
## - YearsWithCurrManager              1   11535533 1229972108 10017
## - DistanceFromHome                  1   11694051 1230130626 10017
## - BusinessTravelTravel_Rarely       1   15158678 1233595254 10019
## - TotalWorkingYears                 1   60831181 1279267756 10044
## - JobLevel                          1 4455896364 5674332940 11078
## 
## Step:  AIC=10011.1
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + GenderMale + JobInvolvement + 
##     JobLevel + MaritalStatusMarried + OverTimeYes + TotalWorkingYears + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - GenderMale                        1     973397 1220320625 10010
## - OverTimeYes                       1    1235965 1220583192 10010
## - YearsInCurrentRole                1    1324042 1220671269 10010
## - MaritalStatusMarried              1    1447871 1220795099 10010
## - `EducationFieldTechnical Degree`  1    2410361 1221757589 10010
## - EducationFieldMedical             1    2792553 1222139781 10011
## - EducationFieldOther               1    2854482 1222201709 10011
## <none>                                           1219347228 10011
## - `EducationFieldLife Sciences`     1    3730687 1223077915 10011
## - JobInvolvement                    1    4156808 1223504036 10012
## - EducationFieldMarketing           1    7199688 1226546916 10013
## - YearsWithCurrManager              1   11371420 1230718648 10016
## - DistanceFromHome                  1   11402634 1230749862 10016
## - BusinessTravelTravel_Rarely       1   15288511 1234635739 10018
## - TotalWorkingYears                 1   61387213 1280734441 10043
## - JobLevel                          1 4455022884 5674370111 11076
## 
## Step:  AIC=10009.66
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + OverTimeYes + TotalWorkingYears + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - OverTimeYes                       1    1256349 1221576974 10008
## - MaritalStatusMarried              1    1363654 1221684279 10008
## - YearsInCurrentRole                1    1376747 1221697372 10008
## - `EducationFieldTechnical Degree`  1    2534172 1222854797 10009
## - EducationFieldMedical             1    2934591 1223255216 10009
## - EducationFieldOther               1    2952481 1223273106 10009
## <none>                                           1220320625 10010
## - `EducationFieldLife Sciences`     1    3863010 1224183635 10010
## - JobInvolvement                    1    4328608 1224649233 10010
## - EducationFieldMarketing           1    7463924 1227784549 10012
## - DistanceFromHome                  1   11368845 1231689470 10014
## - YearsWithCurrManager              1   11670629 1231991254 10014
## - BusinessTravelTravel_Rarely       1   15450092 1235770717 10016
## - TotalWorkingYears                 1   61172833 1281493458 10042
## - JobLevel                          1 4455852470 5676173094 11074
## 
## Step:  AIC=10008.37
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsInCurrentRole                1    1409409 1222986383 10007
## - MaritalStatusMarried              1    1482295 1223059270 10007
## - `EducationFieldTechnical Degree`  1    2545220 1224122194 10008
## - EducationFieldMedical             1    2991031 1224568006 10008
## - EducationFieldOther               1    3009449 1224586424 10008
## <none>                                           1221576974 10008
## - `EducationFieldLife Sciences`     1    3914328 1225491303 10009
## - JobInvolvement                    1    4547222 1226124197 10009
## - EducationFieldMarketing           1    7543285 1229120260 10011
## - YearsWithCurrManager              1   11349206 1232926180 10013
## - DistanceFromHome                  1   12020243 1233597218 10013
## - BusinessTravelTravel_Rarely       1   15111644 1236688618 10015
## - TotalWorkingYears                 1   61154729 1282731703 10040
## - JobLevel                          1 4455295185 5676872159 11072
## 
## Step:  AIC=10007.17
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusMarried              1    1363044 1224349428 10006
## - `EducationFieldTechnical Degree`  1    2561786 1225548170 10007
## - EducationFieldMedical             1    2901771 1225888154 10007
## - EducationFieldOther               1    2911082 1225897465 10007
## <none>                                           1222986383 10007
## - `EducationFieldLife Sciences`     1    3792742 1226779125 10007
## - JobInvolvement                    1    4471502 1227457885 10008
## - EducationFieldMarketing           1    7451759 1230438142 10009
## - DistanceFromHome                  1   11963619 1234950002 10012
## - BusinessTravelTravel_Rarely       1   14841043 1237827427 10014
## - YearsWithCurrManager              1   28139963 1251126347 10021
## - TotalWorkingYears                 1   59828102 1282814485 10038
## - JobLevel                          1 4457081167 5680067550 11071
## 
## Step:  AIC=10005.94
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + JobInvolvement + JobLevel + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldTechnical Degree`  1    2752824 1227102252 10006
## - EducationFieldOther               1    3180429 1227529857 10006
## - EducationFieldMedical             1    3220532 1227569959 10006
## <none>                                           1224349428 10006
## - `EducationFieldLife Sciences`     1    4146940 1228496368 10006
## - JobInvolvement                    1    4488616 1228838043 10006
## - EducationFieldMarketing           1    8082798 1232432225 10008
## - DistanceFromHome                  1   11235766 1235585194 10010
## - BusinessTravelTravel_Rarely       1   15829641 1240179069 10013
## - YearsWithCurrManager              1   27833941 1252183369 10020
## - TotalWorkingYears                 1   60286229 1284635657 10037
## - JobLevel                          1 4456294125 5680643553 11069
## 
## Step:  AIC=10005.5
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     JobInvolvement + JobLevel + TotalWorkingYears + YearsWithCurrManager
## 
##                                 Df  Sum of Sq        RSS   AIC
## - EducationFieldMedical          1     484027 1227586279 10004
## - EducationFieldOther            1     570384 1227672636 10004
## - `EducationFieldLife Sciences`  1    1539629 1228641882 10004
## <none>                                        1227102252 10006
## - JobInvolvement                 1    4876848 1231979100 10006
## - EducationFieldMarketing        1    7552175 1234654428 10008
## - DistanceFromHome               1   11122908 1238225160 10010
## - BusinessTravelTravel_Rarely    1   16039906 1243142158 10012
## - YearsWithCurrManager           1   28238425 1255340677 10019
## - TotalWorkingYears              1   60744379 1287846631 10037
## - JobLevel                       1 4456143479 5683245731 11067
## 
## Step:  AIC=10003.78
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldOther + JobInvolvement + 
##     JobLevel + TotalWorkingYears + YearsWithCurrManager
## 
##                                 Df  Sum of Sq        RSS   AIC
## - EducationFieldOther            1     217774 1227804053 10002
## - `EducationFieldLife Sciences`  1    1209315 1228795593 10002
## <none>                                        1227586279 10004
## - JobInvolvement                 1    4893348 1232479627 10004
## - EducationFieldMarketing        1    8727404 1236313682 10007
## - DistanceFromHome               1   11289818 1238876097 10008
## - BusinessTravelTravel_Rarely    1   16082609 1243668888 10011
## - YearsWithCurrManager           1   28442958 1256029237 10018
## - TotalWorkingYears              1   60380649 1287966928 10035
## - JobLevel                       1 4461632128 5689218407 11066
## 
## Step:  AIC=10001.9
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + JobInvolvement + JobLevel + TotalWorkingYears + 
##     YearsWithCurrManager
## 
##                                 Df  Sum of Sq        RSS   AIC
## - `EducationFieldLife Sciences`  1    1034020 1228838073 10000
## <none>                                        1227804053 10002
## - JobInvolvement                 1    5016604 1232820657 10003
## - EducationFieldMarketing        1    8509972 1236314025 10005
## - DistanceFromHome               1   11298094 1239102147 10006
## - BusinessTravelTravel_Rarely    1   16043145 1243847198 10009
## - YearsWithCurrManager           1   28444204 1256248257 10016
## - TotalWorkingYears              1   60913221 1288717274 10034
## - JobLevel                       1 4463842571 5691646624 11064
## 
## Step:  AIC=10000.48
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     JobInvolvement + JobLevel + TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## <none>                                      1228838073 10000
## - JobInvolvement               1    4967014 1233805087 10001
## - EducationFieldMarketing      1    7495478 1236333551 10003
## - DistanceFromHome             1   11176541 1240014614 10005
## - BusinessTravelTravel_Rarely  1   15900295 1244738368 10007
## - YearsWithCurrManager         1   28609477 1257447550 10014
## - TotalWorkingYears            1   62566528 1291404601 10033
## - JobLevel                     1 4476917171 5705755244 11064
## Start:  AIC=12592.92
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + JobSatisfaction + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - JobSatisfaction                   1       3803 1576942349 12591
## - BusinessTravelTravel_Frequently   1       5558 1576944104 12591
## - MaritalStatusSingle               1       7382 1576945928 12591
## - OverTimeYes                       1     134759 1577073304 12591
## - Education                         1     188564 1577127110 12591
## - Age                               1     198788 1577137334 12591
## - YearsSinceLastPromotion           1     238457 1577177002 12591
## - NumCompaniesWorked                1     586477 1577525022 12591
## - RelationshipSatisfaction          1     611674 1577550219 12591
## - TrainingTimesLastYear             1     622516 1577561061 12591
## - YearsInCurrentRole                1     628641 1577567187 12591
## - YearsAtCompany                    1     635530 1577574076 12591
## - PercentSalaryHike                 1     971456 1577910001 12592
## - EducationFieldMedical             1     981944 1577920489 12592
## - `EducationFieldTechnical Degree`  1    1176428 1578114973 12592
## - GenderMale                        1    1217116 1578155661 12592
## - `EducationFieldLife Sciences`     1    1309979 1578248524 12592
## - EducationFieldOther               1    1670418 1578608964 12592
## - MaritalStatusMarried              1    3096525 1580035070 12593
## - JobInvolvement                    1    3492756 1580431302 12593
## <none>                                           1576938546 12593
## - EnvironmentSatisfaction           1    4514628 1581453174 12593
## - EducationFieldMarketing           1    5727264 1582665810 12594
## - BusinessTravelTravel_Rarely       1    8134971 1585073517 12595
## - YearsWithCurrManager              1    8251530 1585190076 12596
## - DistanceFromHome                  1   13760347 1590698892 12598
## - TotalWorkingYears                 1   48866471 1625805017 12618
## - JobLevel                          1 5411804264 6988742810 13886
## 
## Step:  AIC=12590.93
## .outcome ~ Age + BusinessTravelTravel_Frequently + BusinessTravelTravel_Rarely + 
##     DistanceFromHome + Education + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     MaritalStatusSingle + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - BusinessTravelTravel_Frequently   1       5097 1576947446 12589
## - MaritalStatusSingle               1       7003 1576949351 12589
## - OverTimeYes                       1     133810 1577076159 12589
## - Education                         1     187070 1577129419 12589
## - Age                               1     200671 1577143020 12589
## - YearsSinceLastPromotion           1     242475 1577184824 12589
## - NumCompaniesWorked                1     583290 1577525638 12589
## - RelationshipSatisfaction          1     616026 1577558375 12589
## - YearsInCurrentRole                1     626907 1577569256 12589
## - TrainingTimesLastYear             1     628466 1577570815 12589
## - YearsAtCompany                    1     647896 1577590245 12589
## - PercentSalaryHike                 1     970905 1577913254 12590
## - EducationFieldMedical             1     987026 1577929375 12590
## - `EducationFieldTechnical Degree`  1    1179398 1578121746 12590
## - GenderMale                        1    1214316 1578156664 12590
## - `EducationFieldLife Sciences`     1    1316429 1578258777 12590
## - EducationFieldOther               1    1677012 1578619361 12590
## - MaritalStatusMarried              1    3093547 1580035895 12591
## - JobInvolvement                    1    3512742 1580455091 12591
## <none>                                           1576942349 12591
## - EnvironmentSatisfaction           1    4511496 1581453845 12591
## - EducationFieldMarketing           1    5738899 1582681248 12592
## - BusinessTravelTravel_Rarely       1    8138966 1585081315 12593
## - YearsWithCurrManager              1    8247727 1585190076 12594
## - DistanceFromHome                  1   13758001 1590700350 12596
## - TotalWorkingYears                 1   48970630 1625912979 12616
## - JobLevel                          1 5415487839 6992430188 13885
## 
## Step:  AIC=12588.93
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + MaritalStatusSingle + NumCompaniesWorked + 
##     OverTimeYes + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - MaritalStatusSingle               1       8197 1576955643 12587
## - OverTimeYes                       1     137569 1577085015 12587
## - Education                         1     187032 1577134478 12587
## - Age                               1     203057 1577150503 12587
## - YearsSinceLastPromotion           1     243467 1577190913 12587
## - NumCompaniesWorked                1     588896 1577536342 12587
## - RelationshipSatisfaction          1     621222 1577568668 12587
## - YearsInCurrentRole                1     626030 1577573476 12587
## - TrainingTimesLastYear             1     636931 1577584377 12587
## - YearsAtCompany                    1     648881 1577596327 12587
## - PercentSalaryHike                 1     968767 1577916213 12588
## - EducationFieldMedical             1     988082 1577935528 12588
## - `EducationFieldTechnical Degree`  1    1179130 1578126576 12588
## - GenderMale                        1    1210003 1578157449 12588
## - `EducationFieldLife Sciences`     1    1315852 1578263298 12588
## - EducationFieldOther               1    1676541 1578623987 12588
## - MaritalStatusMarried              1    3120088 1580067534 12589
## - JobInvolvement                    1    3540430 1580487876 12589
## <none>                                           1576947446 12589
## - EnvironmentSatisfaction           1    4508568 1581456014 12589
## - EducationFieldMarketing           1    5736427 1582683873 12590
## - YearsWithCurrManager              1    8259850 1585207296 12592
## - DistanceFromHome                  1   13783647 1590731093 12594
## - BusinessTravelTravel_Rarely       1   17267430 1594214876 12596
## - TotalWorkingYears                 1   49239553 1626186999 12614
## - JobLevel                          1 5420921283 6997868729 13883
## 
## Step:  AIC=12586.93
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + NumCompaniesWorked + OverTimeYes + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsAtCompany + YearsInCurrentRole + 
##     YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - OverTimeYes                       1     137588 1577093230 12585
## - Education                         1     187579 1577143222 12585
## - Age                               1     209766 1577165408 12585
## - YearsSinceLastPromotion           1     243670 1577199312 12585
## - NumCompaniesWorked                1     587504 1577543146 12585
## - RelationshipSatisfaction          1     625888 1577581531 12585
## - YearsInCurrentRole                1     634567 1577590210 12585
## - TrainingTimesLastYear             1     636346 1577591989 12585
## - YearsAtCompany                    1     649143 1577604786 12585
## - PercentSalaryHike                 1     969628 1577925271 12586
## - EducationFieldMedical             1     984159 1577939802 12586
## - `EducationFieldTechnical Degree`  1    1174301 1578129944 12586
## - GenderMale                        1    1201821 1578157464 12586
## - `EducationFieldLife Sciences`     1    1310353 1578265996 12586
## - EducationFieldOther               1    1670245 1578625888 12586
## - JobInvolvement                    1    3533829 1580489472 12587
## <none>                                           1576955643 12587
## - EnvironmentSatisfaction           1    4525763 1581481406 12587
## - MaritalStatusMarried              1    4743891 1581699534 12588
## - EducationFieldMarketing           1    5728426 1582684069 12588
## - YearsWithCurrManager              1    8252055 1585207697 12590
## - DistanceFromHome                  1   13806507 1590762150 12592
## - BusinessTravelTravel_Rarely       1   17268018 1594223661 12594
## - TotalWorkingYears                 1   49257002 1626212644 12612
## - JobLevel                          1 5423097578 7000053221 13882
## 
## Step:  AIC=12585.01
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     Education + `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + NumCompaniesWorked + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Education                         1     179557 1577272787 12583
## - Age                               1     198431 1577291661 12583
## - YearsSinceLastPromotion           1     243551 1577336781 12583
## - NumCompaniesWorked                1     582650 1577675881 12583
## - TrainingTimesLastYear             1     603666 1577696896 12583
## - YearsAtCompany                    1     628685 1577721915 12583
## - RelationshipSatisfaction          1     633524 1577726754 12583
## - YearsInCurrentRole                1     640880 1577734110 12583
## - PercentSalaryHike                 1     961752 1578054983 12584
## - EducationFieldMedical             1     963788 1578057019 12584
## - `EducationFieldTechnical Degree`  1    1165680 1578258910 12584
## - GenderMale                        1    1198404 1578291634 12584
## - `EducationFieldLife Sciences`     1    1290177 1578383407 12584
## - EducationFieldOther               1    1638322 1578731552 12584
## - JobInvolvement                    1    3491288 1580584518 12585
## <none>                                           1577093230 12585
## - EnvironmentSatisfaction           1    4446120 1581539350 12586
## - MaritalStatusMarried              1    4677319 1581770550 12586
## - EducationFieldMarketing           1    5691581 1582784811 12586
## - YearsWithCurrManager              1    8345949 1585439179 12588
## - DistanceFromHome                  1   13683981 1590777211 12590
## - BusinessTravelTravel_Rarely       1   17339153 1594432383 12592
## - TotalWorkingYears                 1   49143022 1626236252 12610
## - JobLevel                          1 5422961522 7000054753 13880
## 
## Step:  AIC=12583.11
## .outcome ~ Age + BusinessTravelTravel_Rarely + DistanceFromHome + 
##     `EducationFieldLife Sciences` + EducationFieldMarketing + 
##     EducationFieldMedical + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + NumCompaniesWorked + PercentSalaryHike + 
##     RelationshipSatisfaction + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsAtCompany + YearsInCurrentRole + YearsSinceLastPromotion + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - Age                               1     149156 1577421942 12581
## - YearsSinceLastPromotion           1     258401 1577531188 12581
## - NumCompaniesWorked                1     512533 1577785320 12581
## - TrainingTimesLastYear             1     579968 1577852755 12581
## - RelationshipSatisfaction          1     612625 1577885412 12581
## - YearsAtCompany                    1     641394 1577914181 12582
## - YearsInCurrentRole                1     643978 1577916765 12582
## - PercentSalaryHike                 1     969471 1578242257 12582
## - EducationFieldMedical             1     983377 1578256164 12582
## - `EducationFieldTechnical Degree`  1    1178304 1578451091 12582
## - GenderMale                        1    1205814 1578478601 12582
## - `EducationFieldLife Sciences`     1    1306831 1578579617 12582
## - EducationFieldOther               1    1640783 1578913570 12582
## - JobInvolvement                    1    3544479 1580817266 12583
## <none>                                           1577272787 12583
## - EnvironmentSatisfaction           1    4524631 1581797418 12584
## - MaritalStatusMarried              1    4660294 1581933080 12584
## - EducationFieldMarketing           1    5659796 1582932583 12584
## - YearsWithCurrManager              1    8213150 1585485937 12586
## - DistanceFromHome                  1   13551880 1590824667 12589
## - BusinessTravelTravel_Rarely       1   17437045 1594709832 12591
## - TotalWorkingYears                 1   48967521 1626240308 12608
## - JobLevel                          1 5433299752 7010572539 13879
## 
## Step:  AIC=12581.19
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsSinceLastPromotion + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsSinceLastPromotion           1     258247 1577680189 12579
## - NumCompaniesWorked                1     565817 1577987760 12580
## - TrainingTimesLastYear             1     580592 1578002535 12580
## - YearsAtCompany                    1     600259 1578022201 12580
## - RelationshipSatisfaction          1     605079 1578027022 12580
## - YearsInCurrentRole                1     629565 1578051507 12580
## - PercentSalaryHike                 1     957519 1578379461 12580
## - EducationFieldMedical             1     988557 1578410499 12580
## - `EducationFieldTechnical Degree`  1    1189480 1578611422 12580
## - GenderMale                        1    1209105 1578631048 12580
## - `EducationFieldLife Sciences`     1    1329008 1578750950 12580
## - EducationFieldOther               1    1628494 1579050436 12580
## - JobInvolvement                    1    3506467 1580928409 12581
## <none>                                           1577421942 12581
## - EnvironmentSatisfaction           1    4546261 1581968204 12582
## - MaritalStatusMarried              1    4588576 1582010518 12582
## - EducationFieldMarketing           1    5730158 1583152100 12582
## - YearsWithCurrManager              1    8152362 1585574304 12584
## - DistanceFromHome                  1   13552922 1590974865 12587
## - BusinessTravelTravel_Rarely       1   17531150 1594953093 12589
## - TotalWorkingYears                 1   60565705 1637987648 12612
## - JobLevel                          1 5452943899 7030365841 13879
## 
## Step:  AIC=12579.33
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsAtCompany + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - YearsAtCompany                    1     428038 1578108228 12578
## - TrainingTimesLastYear             1     529758 1578209947 12578
## - YearsInCurrentRole                1     554080 1578234269 12578
## - NumCompaniesWorked                1     583258 1578263447 12578
## - RelationshipSatisfaction          1     635739 1578315929 12578
## - PercentSalaryHike                 1     913528 1578593717 12578
## - EducationFieldMedical             1     930962 1578611152 12578
## - `EducationFieldTechnical Degree`  1    1119006 1578799195 12578
## - GenderMale                        1    1237841 1578918031 12578
## - `EducationFieldLife Sciences`     1    1268727 1578948916 12578
## - EducationFieldOther               1    1583597 1579263786 12578
## - JobInvolvement                    1    3476308 1581156498 12579
## <none>                                           1577680189 12579
## - EnvironmentSatisfaction           1    4501024 1582181213 12580
## - MaritalStatusMarried              1    4643267 1582323456 12580
## - EducationFieldMarketing           1    5615309 1583295499 12580
## - YearsWithCurrManager              1    8149914 1585830103 12582
## - DistanceFromHome                  1   13605882 1591286071 12585
## - BusinessTravelTravel_Rarely       1   17312870 1594993060 12587
## - TotalWorkingYears                 1   61805417 1639485606 12611
## - JobLevel                          1 5471723022 7049403212 13880
## 
## Step:  AIC=12577.57
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     NumCompaniesWorked + PercentSalaryHike + RelationshipSatisfaction + 
##     TotalWorkingYears + TrainingTimesLastYear + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - NumCompaniesWorked                1     362509 1578470737 12576
## - TrainingTimesLastYear             1     484361 1578592589 12576
## - RelationshipSatisfaction          1     586442 1578694670 12576
## - EducationFieldMedical             1     917607 1579025835 12576
## - PercentSalaryHike                 1     950169 1579058397 12576
## - `EducationFieldTechnical Degree`  1    1073341 1579181569 12576
## - GenderMale                        1    1217853 1579326080 12576
## - `EducationFieldLife Sciences`     1    1231328 1579339556 12576
## - YearsInCurrentRole                1    1365197 1579473424 12576
## - EducationFieldOther               1    1517542 1579625770 12576
## <none>                                           1578108228 12578
## - JobInvolvement                    1    3756267 1581864495 12578
## - EnvironmentSatisfaction           1    4469907 1582578135 12578
## - MaritalStatusMarried              1    4641594 1582749822 12578
## - EducationFieldMarketing           1    5530210 1583638438 12579
## - YearsWithCurrManager              1   12131699 1590239926 12582
## - DistanceFromHome                  1   13408764 1591516992 12583
## - BusinessTravelTravel_Rarely       1   17433569 1595541797 12585
## - TotalWorkingYears                 1   66684365 1644792593 12612
## - JobLevel                          1 5475251523 7053359751 13878
## 
## Step:  AIC=12575.77
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     PercentSalaryHike + RelationshipSatisfaction + TotalWorkingYears + 
##     TrainingTimesLastYear + YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - RelationshipSatisfaction          1     537019 1579007755 12574
## - TrainingTimesLastYear             1     541708 1579012445 12574
## - PercentSalaryHike                 1     953756 1579424493 12574
## - EducationFieldMedical             1     955969 1579426705 12574
## - `EducationFieldTechnical Degree`  1    1127643 1579598379 12574
## - YearsInCurrentRole                1    1207781 1579678518 12574
## - GenderMale                        1    1241144 1579711881 12574
## - `EducationFieldLife Sciences`     1    1283584 1579754321 12574
## - EducationFieldOther               1    1549769 1580020506 12575
## <none>                                           1578470737 12576
## - JobInvolvement                    1    3753160 1582223896 12576
## - EnvironmentSatisfaction           1    4532105 1583002842 12576
## - MaritalStatusMarried              1    4611853 1583082590 12576
## - EducationFieldMarketing           1    5604690 1584075427 12577
## - YearsWithCurrManager              1   11775932 1590246669 12580
## - DistanceFromHome                  1   13188326 1591659063 12581
## - BusinessTravelTravel_Rarely       1   17568226 1596038963 12583
## - TotalWorkingYears                 1   71303025 1649773762 12612
## - JobLevel                          1 5536202742 7114673478 13884
## 
## Step:  AIC=12574.07
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     PercentSalaryHike + TotalWorkingYears + TrainingTimesLastYear + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - TrainingTimesLastYear             1     549366 1579557121 12572
## - PercentSalaryHike                 1     882972 1579890727 12573
## - EducationFieldMedical             1     991741 1579999496 12573
## - YearsInCurrentRole                1    1161726 1580169481 12573
## - `EducationFieldTechnical Degree`  1    1195856 1580203611 12573
## - GenderMale                        1    1257430 1580265186 12573
## - `EducationFieldLife Sciences`     1    1365695 1580373451 12573
## - EducationFieldOther               1    1632925 1580640680 12573
## <none>                                           1579007755 12574
## - JobInvolvement                    1    3813201 1582820957 12574
## - MaritalStatusMarried              1    4410557 1583418312 12574
## - EnvironmentSatisfaction           1    4522968 1583530724 12575
## - EducationFieldMarketing           1    5730670 1584738426 12575
## - YearsWithCurrManager              1   11924264 1590932019 12579
## - DistanceFromHome                  1   12999645 1592007400 12579
## - BusinessTravelTravel_Rarely       1   17272555 1596280311 12582
## - TotalWorkingYears                 1   71048878 1650056633 12610
## - JobLevel                          1 5539413461 7118421217 13882
## 
## Step:  AIC=12572.37
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     PercentSalaryHike + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - PercentSalaryHike                 1     882152 1580439273 12571
## - EducationFieldMedical             1     934045 1580491166 12571
## - `EducationFieldTechnical Degree`  1    1158127 1580715248 12571
## - YearsInCurrentRole                1    1177912 1580735033 12571
## - GenderMale                        1    1255700 1580812821 12571
## - `EducationFieldLife Sciences`     1    1354636 1580911757 12571
## - EducationFieldOther               1    1600986 1581158107 12571
## <none>                                           1579557121 12572
## - JobInvolvement                    1    3751432 1583308553 12572
## - MaritalStatusMarried              1    4307977 1583865098 12573
## - EnvironmentSatisfaction           1    4573711 1584130832 12573
## - EducationFieldMarketing           1    5693853 1585250974 12574
## - YearsWithCurrManager              1   11804023 1591361144 12577
## - DistanceFromHome                  1   13231823 1592788944 12578
## - BusinessTravelTravel_Rarely       1   17223332 1596780453 12580
## - TotalWorkingYears                 1   70803058 1650360179 12608
## - JobLevel                          1 5538869866 7118426987 13880
## 
## Step:  AIC=12570.85
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldMedical + EducationFieldOther + 
##     `EducationFieldTechnical Degree` + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsInCurrentRole + YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - EducationFieldMedical             1     900312 1581339585 12569
## - YearsInCurrentRole                1    1115860 1581555133 12570
## - `EducationFieldTechnical Degree`  1    1198622 1581637895 12570
## - GenderMale                        1    1245700 1581684973 12570
## - `EducationFieldLife Sciences`     1    1319594 1581758867 12570
## - EducationFieldOther               1    1544021 1581983293 12570
## <none>                                           1580439273 12571
## - JobInvolvement                    1    3800221 1584239494 12571
## - MaritalStatusMarried              1    4238887 1584678160 12571
## - EnvironmentSatisfaction           1    4567417 1585006690 12571
## - EducationFieldMarketing           1    5710644 1586149917 12572
## - YearsWithCurrManager              1   12026283 1592465556 12575
## - DistanceFromHome                  1   12897279 1593336552 12576
## - BusinessTravelTravel_Rarely       1   17228862 1597668134 12578
## - TotalWorkingYears                 1   70420406 1650859678 12607
## - JobLevel                          1 5538045947 7118485220 13878
## 
## Step:  AIC=12569.35
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldOther + `EducationFieldTechnical Degree` + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                                    Df  Sum of Sq        RSS   AIC
## - `EducationFieldTechnical Degree`  1     300928 1581640513 12568
## - `EducationFieldLife Sciences`     1     656765 1581996350 12568
## - EducationFieldOther               1     694093 1582033677 12568
## - YearsInCurrentRole                1    1150398 1582489983 12568
## - GenderMale                        1    1329476 1582669060 12568
## <none>                                           1581339585 12569
## - JobInvolvement                    1    3802576 1585142161 12569
## - EnvironmentSatisfaction           1    4494727 1585834311 12570
## - MaritalStatusMarried              1    4567351 1585906936 12570
## - YearsWithCurrManager              1   12147640 1593487225 12574
## - DistanceFromHome                  1   13038265 1594377849 12574
## - EducationFieldMarketing           1   13136738 1594476322 12574
## - BusinessTravelTravel_Rarely       1   17128297 1598467881 12577
## - TotalWorkingYears                 1   70342855 1651682439 12605
## - JobLevel                          1 5544158375 7125497959 13877
## 
## Step:  AIC=12567.51
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + `EducationFieldLife Sciences` + 
##     EducationFieldMarketing + EducationFieldOther + EnvironmentSatisfaction + 
##     GenderMale + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsInCurrentRole + YearsWithCurrManager
## 
##                                 Df  Sum of Sq        RSS   AIC
## - `EducationFieldLife Sciences`  1     438722 1582079234 12566
## - EducationFieldOther            1     554854 1582195367 12566
## - YearsInCurrentRole             1    1198420 1582838933 12566
## - GenderMale                     1    1348099 1582988611 12566
## <none>                                        1581640513 12568
## - JobInvolvement                 1    3812536 1585453049 12568
## - MaritalStatusMarried           1    4488235 1586128748 12568
## - EnvironmentSatisfaction        1    4587122 1586227635 12568
## - YearsWithCurrManager           1   12075731 1593716244 12572
## - DistanceFromHome               1   12896797 1594537309 12573
## - EducationFieldMarketing        1   12922393 1594562906 12573
## - BusinessTravelTravel_Rarely    1   17082647 1598723160 12575
## - TotalWorkingYears              1   71046809 1652687322 12604
## - JobLevel                       1 5543880292 7125520804 13875
## 
## Step:  AIC=12565.76
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EducationFieldOther + EnvironmentSatisfaction + GenderMale + 
##     JobInvolvement + JobLevel + MaritalStatusMarried + TotalWorkingYears + 
##     YearsInCurrentRole + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - EducationFieldOther          1     357353 1582436587 12564
## - YearsInCurrentRole           1    1190021 1583269255 12564
## - GenderMale                   1    1338565 1583417800 12564
## <none>                                      1582079234 12566
## - JobInvolvement               1    3772165 1585851399 12566
## - MaritalStatusMarried         1    4511766 1586591000 12566
## - EnvironmentSatisfaction      1    4556300 1586635534 12566
## - YearsWithCurrManager         1   12097238 1594176473 12570
## - DistanceFromHome             1   12755714 1594834948 12571
## - EducationFieldMarketing      1   12790926 1594870161 12571
## - BusinessTravelTravel_Rarely  1   16922277 1599001512 12573
## - TotalWorkingYears            1   71541114 1653620349 12602
## - JobLevel                     1 5548027776 7130107011 13874
## 
## Step:  AIC=12563.95
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsInCurrentRole + 
##     YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - YearsInCurrentRole           1    1185652 1583622239 12563
## - GenderMale                   1    1306186 1583742774 12563
## <none>                                      1582436587 12564
## - JobInvolvement               1    3878198 1586314785 12564
## - MaritalStatusMarried         1    4525054 1586961641 12564
## - EnvironmentSatisfaction      1    4749834 1587186421 12565
## - YearsWithCurrManager         1   12083079 1594519666 12569
## - EducationFieldMarketing      1   12500834 1594937422 12569
## - DistanceFromHome             1   12819835 1595256423 12569
## - BusinessTravelTravel_Rarely  1   16845050 1599281637 12571
## - TotalWorkingYears            1   72132444 1654569032 12601
## - JobLevel                     1 5551384114 7133820701 13872
## 
## Step:  AIC=12562.6
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + GenderMale + JobInvolvement + JobLevel + 
##     MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## - GenderMale                   1    1393607 1585015846 12561
## <none>                                      1583622239 12563
## - JobInvolvement               1    3824983 1587447223 12563
## - MaritalStatusMarried         1    4172584 1587794824 12563
## - EnvironmentSatisfaction      1    5073964 1588696204 12563
## - EducationFieldMarketing      1   12554652 1596176892 12568
## - DistanceFromHome             1   12794396 1596416635 12568
## - BusinessTravelTravel_Rarely  1   16592918 1600215158 12570
## - YearsWithCurrManager         1   28480066 1612102306 12576
## - TotalWorkingYears            1   71021240 1654643480 12599
## - JobLevel                     1 5550206003 7133828242 13870
## 
## Step:  AIC=12561.37
## .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + EducationFieldMarketing + 
##     EnvironmentSatisfaction + JobInvolvement + JobLevel + MaritalStatusMarried + 
##     TotalWorkingYears + YearsWithCurrManager
## 
##                               Df  Sum of Sq        RSS   AIC
## <none>                                      1585015846 12561
## - JobInvolvement               1    3932348 1588948194 12562
## - MaritalStatusMarried         1    3970026 1588985873 12562
## - EnvironmentSatisfaction      1    4979154 1589995000 12562
## - DistanceFromHome             1   12838996 1597854842 12566
## - EducationFieldMarketing      1   12878775 1597894622 12566
## - BusinessTravelTravel_Rarely  1   16737293 1601753139 12568
## - YearsWithCurrManager         1   29408237 1614424083 12575
## - TotalWorkingYears            1   70832125 1655847971 12597
## - JobLevel                     1 5548821138 7133836984 13868
# Final model
summary(case2.salary.stepwise)
## 
## Call:
## lm(formula = .outcome ~ BusinessTravelTravel_Rarely + DistanceFromHome + 
##     EducationFieldMarketing + EnvironmentSatisfaction + JobInvolvement + 
##     JobLevel + MaritalStatusMarried + TotalWorkingYears + YearsWithCurrManager, 
##     data = dat)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5857.8  -761.3     0.4   735.0  4244.8 
## 
## Coefficients:
##                              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 -1887.027    253.357  -7.448 2.30e-13 ***
## BusinessTravelTravel_Rarely   308.194    102.270   3.014  0.00266 ** 
## DistanceFromHome              -15.086      5.716  -2.639  0.00846 ** 
## EducationFieldMarketing      -385.885    145.978  -2.643  0.00836 ** 
## EnvironmentSatisfaction       -68.977     41.965  -1.644  0.10061    
## JobInvolvement                 95.713     65.526   1.461  0.14447    
## JobLevel                     3745.203     68.256  54.870  < 2e-16 ***
## MaritalStatusMarried          137.169     93.461   1.468  0.14256    
## TotalWorkingYears              64.114     10.342   6.199 8.79e-10 ***
## YearsWithCurrManager          -58.150     14.557  -3.995 7.04e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1358 on 860 degrees of freedom
## Multiple R-squared:  0.9137, Adjusted R-squared:  0.9128 
## F-statistic:  1012 on 9 and 860 DF,  p-value: < 2.2e-16
# Results including RMSE of final model
case2.salary.stepwise$results
##   parameter     RMSE  Rsquared      MAE   RMSESD RsquaredSD    MAESD
## 1      none 1378.461 0.9112372 1037.563 88.32867 0.01226538 63.08447

Buliding a Random Forest model and Comparing to Linear Regression Model

We will the variables that were selected by random forest feature selection to build the model.

We found that, the Random Forest performs slightly better with an Adjusted R-squared of 0.9472 and the RMSE of $1069.555 as compared to Linear regression model.

train(MonthlyIncome ~ JobLevel + JobRole + TotalWorkingYears + YearsAtCompany + Age,
  data = case2_salary,
  method = "lm",
  trControl = train.CV
) -> case2_salary.stepwise.rf

# Final model
summary(case2_salary.stepwise.rf)
## 
## Call:
## lm(formula = .outcome ~ ., data = dat)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3947.4  -637.6   -21.3   604.0  4122.0 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                      -67.470    263.485  -0.256  0.79796    
## JobLevel                        2800.149     82.407  33.979  < 2e-16 ***
## `JobRoleHuman Resources`        -317.625    252.023  -1.260  0.20790    
## `JobRoleLaboratory Technician`  -595.611    169.362  -3.517  0.00046 ***
## JobRoleManager                  3991.649    229.479  17.394  < 2e-16 ***
## `JobRoleManufacturing Director`  136.295    167.359   0.814  0.41565    
## `JobRoleResearch Director`      3973.272    216.235  18.375  < 2e-16 ***
## `JobRoleResearch Scientist`     -322.429    169.632  -1.901  0.05767 .  
## `JobRoleSales Executive`         -65.567    144.365  -0.454  0.64982    
## `JobRoleSales Representative`   -413.192    212.294  -1.946  0.05194 .  
## TotalWorkingYears                 51.888     10.345   5.016 6.42e-07 ***
## YearsAtCompany                    -6.050      8.052  -0.751  0.45267    
## Age                               -1.231      5.496  -0.224  0.82282    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1064 on 857 degrees of freedom
## Multiple R-squared:  0.9472, Adjusted R-squared:  0.9465 
## F-statistic:  1282 on 12 and 857 DF,  p-value: < 2.2e-16
# Results including RMSE of final model
case2_salary.stepwise.rf$results
##   intercept     RMSE  Rsquared      MAE   RMSESD RsquaredSD    MAESD
## 1      TRUE 1061.477 0.9457431 811.9153 110.9998 0.01334904 67.68333

Predictions for Monthly Income

Validating the predictions for both Linear regression and Random Forest Model on the training data

We will use the training data and make the predictions using the model and see which model is working better with lower RMSE(prediction error).

  • We found that the random forest model are making predictions with lower RMSE(prediction error)=0.1651 as compared to the linear regression model with RMSE(prediction error)=0.2112.
# generating predictions on test data
case2$MonthlyIncome_LM <- predict(case2.salary.stepwise, newdata = case2)
case2$MonthlyIncome_LM
##   [1]  6203.103 17743.516  9682.083  9963.727  2256.400  9378.931  2747.356
##   [8]  6189.144  2297.004  5611.070 17848.577  1999.341 10372.419  2417.691
##  [15]  2396.606  5641.202  6422.155  6163.953  2648.697  6803.394  6546.452
##  [22]  6530.650  5712.927  6051.128  6102.043 18057.681  6151.839  5818.311
##  [29] 10358.284  1924.216  5457.387  2373.281 14785.895  2438.062  6264.573
##  [36]  2280.763 10520.312  6292.564 18938.773  1945.592 14770.909  6358.035
##  [43]  2909.863 18407.508  2305.650  2244.732  6564.361  9274.503  1546.047
##  [50]  2002.019  2744.403 19041.388  2821.333  5872.239  6111.148  2198.776
##  [57]  2079.964  2620.687 10397.065  1449.012 10351.955  9888.408  2567.572
##  [64]  1796.160  2122.426  2562.864  6403.552  2084.542  2333.715  2845.402
##  [71]  3069.051  6057.609  6210.000  2656.378  9964.621  6030.818  9986.617
##  [78] 14527.112 10183.003  2020.118  6871.240  6335.542  6006.571  6423.410
##  [85]  6417.860 15105.265  6200.944  2143.933  9409.102 18232.662  2040.520
##  [92]  9486.243  2500.514  6387.415 18175.235  7116.218 14990.566  6647.636
##  [99]  2116.562  2536.470  2438.864 10064.382  5642.911  2761.341 15257.535
## [106]  2678.019  5854.484 19079.422  6169.602  2287.587  1828.198 14737.053
## [113] 10854.408  6610.259  6427.150  9397.902  6103.343  6234.834  2541.611
## [120]  6219.555 10029.328  2183.078 10184.098  5557.767  5840.182  6141.140
## [127]  1808.650  5901.008  6760.583 14808.242  6076.382  5651.286  5449.860
## [134]  6327.741  6014.040  5992.160  2406.040 10562.999  2620.867 10286.643
## [141] 14795.811  2049.486  9988.837  6429.083  6622.808  5861.764  2267.581
## [148]  6542.829  2083.925  5846.697  6325.367  5562.001  6226.941  6669.994
## [155]  2228.811  5514.790  6162.079 14337.415 10254.539 10593.956  6590.313
## [162]  9157.783  5753.593  6286.897  9492.912  2132.623 15040.193 14051.157
## [169]  6462.990  2122.378  5432.668  6228.327 11111.253  9402.917 14746.219
## [176]  2078.732 18571.542  2451.719  9161.170  6381.253 10340.207  6328.790
## [183]  2718.418 10176.171  2060.729  2266.969  5721.901 15359.704 18751.286
## [190]  5917.360  5819.474  9673.151  6473.199  6272.415  2521.067  2432.777
## [197]  2645.687 14570.033 10360.977  2026.713 14387.125  6300.632  6405.289
## [204]  2412.109  2591.788  2771.713  5690.998  6850.372  2498.784  9963.529
## [211] 14004.084 18180.657  2378.912  6345.786  2505.981  2613.018  7132.140
## [218] 13904.809  2200.957  2582.846  6044.717  5887.047  5774.711  2337.848
## [225]  2646.471  2662.003  2250.350  2338.042  6361.803 14658.743  5914.710
## [232]  1910.643 14005.309  6363.903 13823.976 10584.194 18196.974  6225.066
## [239]  2621.960  9894.349  9619.056 18021.528  2505.661  2558.599  6506.366
## [246]  2521.679  9755.137  2417.968  5877.638 14603.466  1960.677  6063.171
## [253]  2253.785  2267.168  9704.035  2273.062  1420.022  5827.929 10390.835
## [260]  2479.928  2004.841  2571.936  2452.858  1849.879  2449.563  2586.275
## [267] 13519.154  2211.545  5620.836  6159.731  6024.675  6059.451  5867.066
## [274]  5994.931 18547.749 18776.955  2367.686  1957.502  5644.987  6139.787
## [281]  6205.742  2380.816  6571.612  5857.749  2913.172  6330.182  2136.116
## [288]  2104.967  9644.932  2477.057  2559.127  5767.726  2316.177  9750.669
## [295] 14331.013  2353.097  5743.685  5752.639  1847.055  2504.373  6280.993
## [302]  9475.217  2353.541  6100.925  2596.227  2209.535  2898.839  2319.266
## [309]  6232.097  6175.157  6701.716 14115.204  1865.899  6637.751  6027.314
## [316]  6032.437  1927.880  6090.115  6134.700  2040.087  2169.025  2613.579
## [323]  2302.907  6517.518 14320.772  2319.327 18083.884  6111.984  6273.437
## [330] 14291.539 14941.718  9985.802  2133.532 10029.044 18737.593  5720.732
## [337]  5267.051  5992.481  5920.094  2211.545  2666.265  1892.621  9957.590
## [344]  1957.241  5892.753 13703.882  5788.709  5820.585  1806.205 15348.846
## [351] 10530.638  6422.130  6358.631  5890.535 10474.623  5950.030  2343.640
## [358]  2237.422  6363.645  2610.429 18910.280  1736.152 18487.435 18222.326
## [365] 17908.953 15217.407  5777.165  6650.006  2399.782  6429.366  5887.677
## [372]  9410.010 10360.225  2407.728  2053.758 14178.969  2440.869  6391.435
## [379]  2245.244  2580.460 18508.393  2112.464  6345.702  2408.749  3208.357
## [386] 10112.150  9203.759  6032.785  6644.495  2041.581  6276.648  5620.947
## [393]  1975.133  9432.812  2373.800  2292.450 15335.946  2397.858  5978.633
## [400] 10377.116  6359.136  5955.736  2628.580 10328.426  2070.081 14711.324
## [407]  5774.246  2006.386 15211.903 14887.634  2515.535  9425.697  2679.004
## [414]  5334.322  1393.923  6277.050  2270.530  2156.177  6207.121 10036.249
## [421]  6397.939  6067.245  6278.303  1854.323  5728.976 10418.172  1896.898
## [428]  2228.973  2206.959  6244.221  5980.604  2081.694  6411.249  2085.660
## [435]  9947.732  5797.218  2478.827  2395.505  2070.888  6317.326  5818.528
## [442]  2639.724  2674.930  2628.104 18619.649  3480.250  6431.508  6738.663
## [449]  5294.911  5435.268  6554.628  2086.119  5818.553  5641.804 14669.670
## [456] 18071.956  6716.314  5994.345  2827.185  6149.618  2582.012  3066.188
## [463]  9829.545  5596.975  2108.064  2415.814  2548.904  2778.492  5456.145
## [470]  5968.522  2690.937  1475.748 10804.596  2211.664  2298.400  5792.621
## [477]  5776.857  6205.156  2799.828 10379.631  6520.202  2545.438  5779.327
## [484]  3227.754 11673.853  6267.834  2243.897  2138.420 11238.755  6406.760
## [491] 18062.540 14614.520  6025.521  9861.723  6185.445 13849.945  2767.454
## [498]  2148.914  6404.518  5975.319 11137.018  1999.039  2712.089  9760.811
## [505] 15045.197  6367.448  1780.402 10000.172  1998.390 18261.924  6233.836
## [512]  9731.543  2529.337  9815.567  2016.607  6418.386  1679.633  2350.723
## [519]  6314.766  2343.041  1811.531  2085.802 11303.204 18255.333  2691.574
## [526] 10279.804  6334.013  6289.540  2356.840  2515.870 10280.908  7007.379
## [533]  2366.576  5918.024  2182.360  2192.017  9893.089  2472.863  2521.530
## [540]  5900.805  6003.971  2838.492  1803.378  6927.395  2330.928  2304.470
## [547] 11343.670  6125.592 10699.259  2105.579 18013.789  2251.239  5802.619
## [554]  2846.533  5724.564  6733.851  7089.256  2552.160  5936.378  6219.727
## [561]  2541.330 14581.145  2282.531  9783.382  2440.756  2568.853  6141.345
## [568]  6321.218  6151.555 14308.073  6287.372  1970.171  5751.706  6348.894
## [575]  5610.699  6060.684  3556.008  2041.589  5937.137  6270.864  2360.637
## [582] 14298.986  6696.662  6004.032  6311.691  6396.978  6037.208  2481.781
## [589]  2615.199  2176.930  1738.591  6116.284  2402.691  2415.141 10146.357
## [596]  6322.188  9892.940  7354.318  6443.531  2822.322  1874.576  6197.419
## [603] 10088.133  2538.150  1614.399 15486.659  6818.567  6225.709  2342.553
## [610]  1867.003  6590.313  5929.745  2917.961  1829.200  9850.387  6232.545
## [617]  2762.256  6062.362  9788.925  1998.698  1747.294  6413.154  2862.872
## [624]  9514.728  2325.410  2470.309  6145.751  9661.001 10825.128  9606.498
## [631]  3312.402 10313.409  7233.662  2788.071 10409.691  1862.449 14587.776
## [638]  9990.766  2353.547  2034.791  1879.656  6434.386 14919.334  1894.346
## [645]  2225.765  9654.271  1817.698  1942.928  6055.719  2745.620  2142.845
## [652]  5911.003  9888.322 10536.324  1922.484  5938.886 10345.502 14046.185
## [659]  6133.188  5701.140  5830.739  2542.262 10365.843  2240.739  5253.793
## [666]  6220.076 10266.952  2380.708  6537.362 15289.869 10678.857  6044.717
## [673]  5724.106  1668.201  2632.021 17955.400  6464.254  5994.374  6592.015
## [680]  2968.590  5733.129  2086.385  6399.510 10007.403  2271.215  9969.493
## [687]  9387.564  2618.339  2253.785  2414.447  6194.737  9384.213  6901.443
## [694]  2070.383  5687.309  2127.760 14513.422  6466.148  1962.104 18497.689
## [701]  2192.658  6272.389  9291.697  2165.138  2694.707  5908.075  6444.918
## [708]  2549.240  2216.513 14862.252  9798.497 14752.692  2691.940  9890.965
## [715]  9468.133  1855.571  5905.033  6075.013  5860.011  9856.840 10004.836
## [722]  6303.044  2321.011  9887.773  2569.826  6456.088  2399.889  2039.119
## [729]  1757.206  2487.769  6265.504  6784.082  1850.020  5949.932  2343.046
## [736]  6365.252 13842.164  6393.541  6177.975  6117.600  6017.171 10118.658
## [743]  6304.878  2262.278  6161.132  1962.291  2349.158  5878.056  2146.449
## [750]  2356.563  1359.678  1930.364 14374.115 10213.840 10833.306  1867.276
## [757]  5977.261  7357.451  2703.225 17785.170  2123.372 15256.142  6036.116
## [764]  6198.909  2478.647  6133.465  2618.777 10039.085  6429.400  5922.157
## [771]  5638.981 10536.671 10215.695  2211.514 10482.193  2341.316  2441.727
## [778]  1972.327  1805.555  2646.772  1768.109  6497.697  2406.692  6095.575
## [785]  5661.155 14076.478 10812.257  6210.754 19418.542  2232.595  6512.819
## [792]  2231.009 10204.131 10241.033  5384.814  2265.170 14082.531  2327.176
## [799]  1893.880  6574.141  6368.073  6380.976 14233.389  9777.640  6516.393
## [806] 10208.977  6359.456  2109.046  2387.291  2453.822  5735.682  2839.113
## [813]  5532.181 18634.422  1911.396  2766.138  6635.262 10259.097  2458.054
## [820]  5609.187  2741.392  5760.041  5261.834  1861.195  6338.568 18501.644
## [827] 10025.986  5715.881  2235.944 18793.652  5516.631  1459.829  2142.661
## [834]  2174.921 15068.483  9600.947  2661.866  5935.805 10794.615 18384.962
## [841]  2201.322  9571.578 14825.829  9824.474  5954.504  5911.262  2334.412
## [848] 10628.725  5828.374  2186.614  5844.940  2122.056  5776.744  6085.074
## [855]  5863.044  2273.285  2412.656  9482.435  2464.173 10136.208  1926.995
## [862]  9612.136  5589.162 14098.997 10030.479  9847.718  5182.795  6506.701
## [869]  2748.598  6247.231
case2$MonthlyIncome_RF <- predict(case2_salary.stepwise.rf, newdata = case2)
case2$MonthlyIncome_RF
##   [1]  5812.726 18825.963  8932.968  8869.756  2655.737  8848.581  2698.798
##   [8]  5830.769  2323.473  5857.682 18864.846  2518.102  9259.886  2328.397
##  [15]  2834.962  5841.646  5996.439  5969.664  2649.477  5985.445  6281.202
##  [22]  6018.730  5354.768  5917.733  5773.286 19086.757  5884.917  5707.719
##  [29]  8968.388  2581.481  5846.465  2738.183 16478.665  2564.467  6038.786
##  [36]  2326.869  8924.000  6241.054 19681.608  2424.892 16876.438  5482.837
##  [43]  2946.746 19112.484  2427.777  2635.427  5946.750  8639.228  2297.330
##  [50]  2676.243  2778.577 19441.118  2814.471  5294.369  6135.185  2315.790
##  [57]  2709.666  2559.754 13008.774  2334.552  8956.509  8765.195  2424.892
##  [64]  2388.093  2153.364  2697.777  5946.567  2337.948  2608.457  3143.956
##  [71]  2952.188  5713.874  6035.093  2391.877  8673.882  5450.348  8683.941
##  [78] 16311.835  9290.496  2144.747  6259.551  6465.786  6092.829  5797.049
##  [85]  6461.997 12723.183  6404.816  2329.226  8646.719 18997.735  2136.130
##  [92]  8735.934  2454.738  5978.375 18922.774  6332.327 16182.928  6363.327
##  [99]  2290.773  2428.183  2384.912  8825.149  5718.587  2623.229 16802.787
## [106]  2471.770  6091.808 19612.802  6096.300  2554.213  2513.299 16355.404
## [113]  9154.552  6313.901  6160.149  8680.248  5671.729  5396.200  2979.877
## [120]  6132.712 12732.417  2385.314  9115.751  5793.241  5889.947  5882.561
## [127]  2829.243  6078.162  6074.234 12193.190  5889.947  5791.799  5808.045
## [134]  5954.083  5296.831  5850.296  2147.209  9483.838  2492.065  8814.272
## [141] 12797.845  2430.531  9038.794  5754.683  6189.313  5614.917  2736.335
## [148]  5829.644  2394.655  5915.736  5877.944  5886.254  6023.768  6034.977
## [155]  2141.054  5625.785  6129.796 12065.872  9301.926 13286.257  5358.672
## [162]  8756.894  5707.719  5659.429  8780.436  2386.545 16422.856 15548.358
## [169]  6019.875  2902.972  5900.815  5934.354  9717.114  8691.221 16098.225
## [176]  2476.077 19072.283  2671.424  8640.565  5994.743  9162.160  5948.904
## [183]  3273.152  8876.157  2455.767  2604.975  5959.217 16553.520 19237.364
## [190]  5661.986  5683.742  8678.093  6537.873  6080.159  2613.487  2393.310
## [197]  2568.970 12094.329  9391.033  2153.364 12153.805  5629.392  6271.469
## [204]  2852.315  2567.225  2722.794  5753.347  6362.096  2770.276  8785.149
## [211] 12187.606 18956.821  2566.207  6008.327  2612.256  2757.966  6413.984
## [218] 16177.908  2602.513  2744.952  5700.439  5665.258  5753.557  2421.622
## [225]  2852.105  2650.199  2139.823  2566.523  5627.121 12538.702  6072.113
## [232]  2368.080 12167.761  6194.698 16217.802  9019.265 18985.443  5446.039
## [239]  2683.509 13145.877  8875.955 19011.065  2655.632  2581.892  6091.808
## [246]  2492.275  8935.334  2423.661  5746.287 16106.947  2142.285  6003.254
## [253]  2400.695  2474.621 13032.771  2702.385  2373.004  5827.287  8662.301
## [260]  2457.411  2430.941  2890.873  2481.302  2421.304  2388.605  2375.064
## [267] 15810.058  2143.516  5904.751  5959.112  5882.350  5672.768  5498.945
## [274]  5975.565 19561.618 19278.604  2474.846  2502.731  5711.517  5654.528
## [281]  5872.713  3015.464  6075.996  6061.297  2689.146  5584.170  2429.008
## [288]  2238.780  8687.528  2413.918  2466.530  5409.223  2697.883 12896.180
## [295] 16038.142  2341.325  6085.653  5307.910  2561.493  2617.074  5886.254
## [302]  8636.872  2733.452  5625.699  2696.020  2388.605  2484.574  2679.725
## [309]  6298.822  5625.890  5623.439 12240.725  2692.959  6119.173  5900.183
## [316]  5821.951  2564.763  5686.639  5804.109  2432.701  2338.968  2826.781
## [323]  2861.953  6042.851 12184.018  2422.853 18912.716  5601.492  6080.389
## [330] 16041.729 16209.483  8869.756  2637.167  8848.581 19390.786  5817.564
## [337]  5653.369  5817.893  5665.153  2149.671  2671.214  2194.278  8741.198
## [344]  2419.160  5821.237 11988.206  5868.561  5912.148  2667.415 12560.333
## [351] 13109.886  5899.584  5985.318  5886.594  9277.271  6125.082  2607.437
## [358]  2673.781  6042.277  2832.216 19425.466  2329.628 19379.628 18871.801
## [365] 18935.701 12824.242  5607.138  5836.617  2577.391  5647.541  5814.317
## [372]  8694.914  8782.092  2731.411  2386.545 16511.676  2923.893  6141.991
## [379]  2655.632  2706.289 18920.189  2749.756  6174.394  2446.839  3220.957
## [386] 12947.047  8682.710  6030.380  5878.771  2431.152  5718.587  5682.597
## [393]  2555.444  9226.193  2761.554  2515.655 16380.710  2464.878  6059.792
## [400]  9233.217  6172.713  6157.942  2430.329  8737.505  2642.197 16137.063
## [407]  6031.049  2413.622 16516.819 16170.802  2651.819  8675.324  2773.758
## [414]  5635.422  2421.199  6362.011  2656.249  2294.256  6265.314 12728.935
## [421]  5856.462  5864.528  6009.409  2114.911  5661.986  9142.411  2419.160
## [428]  2521.915  2287.081  6235.268  5663.217  2648.141  5890.460  2420.391
## [435]  8782.889  5800.732  2623.124  2477.820  2395.454  5950.484  5641.491
## [442]  2538.114  2362.041  2763.896 19083.134  3198.191  6070.848  6000.007
## [449]  5348.824  5870.251  5956.639  2637.167  5882.561  5885.023 16137.186
## [456] 18838.291  5887.485  5914.753  2582.607  5351.286  2488.372  2846.874
## [463]  9023.969  6067.706  2662.597  2656.652  2620.239  2346.144  5786.373
## [470]  5839.123  2658.094  2420.391 13132.950  2785.550  2285.955  6082.621
## [477]  5882.657  5850.360  2665.465 12994.117  5778.210  2750.896  5908.009
## [484]  3315.087 10095.113  5795.597  2328.397  2601.282  8865.652  5979.606
## [491] 18969.615 16323.899  5816.419  8794.115  5881.330 16445.753  2757.861
## [498]  2548.058  6328.260  5919.984  9945.905  2389.731  3191.824  8891.958
## [505] 16276.636  5751.316  2324.704  8906.863  2894.038 18916.409  5878.868
## [512]  8923.215  2859.491 12953.202  2431.152  6256.688  2334.552  2418.335
## [519]  5364.721  2303.375  2649.477  2148.440  9246.303 19267.218  2694.789
## [526]  9668.062  5848.611  5769.698  2642.197  2674.284  9209.016  6195.215
## [533]  2832.936  5930.181  2422.239  2690.286  8733.463  2552.757  2571.024
## [540]  5846.254  5358.672  3035.563  2422.853  6342.727  2643.428  2826.781
## [547]  9024.509  5400.808 13184.847  2634.691 18882.898  2661.667  5629.272
## [554]  3025.707  5724.880  6285.661  5850.566  2643.428  6081.855  5801.963
## [561]  2718.900 16216.325  2299.285 12876.087  2451.256  2643.217  5328.520
## [568]  5888.716  5904.192 12276.812  6112.974  2430.239  5753.663  5883.792
## [575]  5716.336  5944.446  3304.418  2415.873  6085.548  5772.160  2451.361
## [582] 15878.855  6258.320  5799.501  5921.458  5623.950  5967.072  2763.803
## [589]  2488.477  2289.437  2566.523  6164.871  2526.311  2541.184  9245.123
## [596]  5839.184  9177.750  5919.687  5910.917  2679.936  2335.783  5601.702
## [603] 12687.915  2559.754  2375.466 16671.322  6408.194  5787.191  2477.820
## [610]  2422.430  5358.567  5952.841  2716.543  2341.937  8700.964  5582.939
## [617]  2481.302  5855.892  8709.614  2139.823  2158.288  6534.083  2863.078
## [624]  8384.814  2517.705  2606.206  5666.910 12815.582  9576.842  8709.719
## [631]  3298.169  8867.294  6400.305  2449.919  8792.875  2185.661 16133.406
## [638]  8644.152  2655.737  2521.492  2145.978  6219.561 16611.151  2597.589
## [645]  2613.171  8923.895  2114.911  2242.579  6163.640  2582.510  2231.500
## [652]  5949.512 13185.876 13043.859  2305.440  5730.015 13013.181 16322.694
## [659]  6003.509  5899.838  5356.210  3052.481  8824.833  2231.500  5889.841
## [666]  5997.860  8735.934  2487.351  5356.210 16847.394 13060.662  5701.669
## [673]  5668.036  2825.550  2618.305 19150.840  6089.241  5346.362  6534.592
## [680]  2913.523  5665.679  2481.091  5989.244  8855.219  2604.975  9027.010
## [687]  8715.874  2714.695  2159.519  2976.275  5651.008 12725.154  6201.508
## [694]  2522.936  5696.746  2399.147 16247.012  5644.464  2297.330 19122.922
## [701]  2425.195  5700.439  8975.888  2664.129  2693.543  6162.304  5828.011
## [708]  2773.849  2319.483 16484.215 12700.243 16708.973  2435.148  8974.657
## [715]  8681.479  2431.350  5888.716  5646.415  6032.175  8899.238  8882.110
## [722]  6066.370  2863.078  9118.582  2500.471  5873.590  2762.572  2597.589
## [729]  2150.902  2253.552  5817.694  6035.859  2427.657  5715.000  2414.236
## [736]  5852.620 11988.206  6032.879  5653.369  5342.976  5735.716 12775.098
## [743]  5623.237  2246.271  5717.567  2205.252  2574.809  6138.761  2382.555
## [750]  2559.032  2386.545  2418.842 12550.503  8888.820 13045.785  2519.649
## [757]  5948.128  6492.120  2453.507 19073.426  2530.216 16258.716  6287.719
## [764]  6282.690  2562.604  5340.207  2818.164  9249.880  6198.856  6099.442
## [771]  5851.284  9310.905  9207.785  2463.662  9405.594  2473.615  2659.205
## [778]  2325.935  2425.932  2570.005  2452.371  6401.586  2713.449  5885.023
## [785]  5610.908 15517.081 13028.067  5668.759 19596.983  2471.153  5377.630
## [792]  2817.240  8911.127  9067.914  5929.674  2828.012 12046.387  2155.826
## [799]  2432.701  6132.808  5915.271  5911.683 16039.373  8642.921  5747.000
## [806]  8994.386  5729.666  2474.846  2831.705  2658.094  5450.348  2451.361
## [813]  5666.910 19237.795  2416.275  3063.253  6254.849 12913.414  2381.219
## [820]  5732.023  2664.038  5932.294  5792.115  2190.585  5969.875 19031.246
## [827]  8742.080  5614.812  2520.985 19330.202  5294.369  2296.099  2377.631
## [834]  2432.701 12629.975  8634.410  2743.510  5883.792  9731.187 19219.119
## [841]  2114.911  8438.038 12759.489  8755.557  5724.637  5361.134  2159.519
## [848]  9161.947  5796.828  2477.820  5624.554  2558.523  5365.952  5916.956
## [855]  5815.442  2322.242  2758.177  8889.496  2419.566  8737.198  2447.045
## [862]  9280.859  5862.152 12329.474  8914.609  8920.457  5617.274  5949.925
## [869]  2699.923  5376.715
# Prediction Error for Linear Regression
case2.LM.RMSE=RMSE(case2$MonthlyIncome_LM, case2$MonthlyIncome) / mean(case2$MonthlyIncome)
case2.LM.RMSE
## [1] 0.2112216
# Prediction Error for Linear Regression
case2.RF.RMSE=RMSE(case2$MonthlyIncome_RF, case2$MonthlyIncome) / mean(case2$MonthlyIncome)
case2.RF.RMSE
## [1] 0.1651993

Generating the predictions for both Linear regression and Random Forest Model on the original test data for salary

We run the model on the test data sets that do not have the MonthlyIncome parameter

  • MonthlyIncome_LM = Predictions for Regression
  • MonthlyIncome_RF = Predictions for Random Forest

We have saved the predictions of the original test data in the Salary_LM.csv and Salary_RF.csv

NoSalary.df=read.csv("https://raw.githubusercontent.com/RashmiAPatel19/SMU_MSDS_6306_CaseStudy2_Spring2021/main/DDSCaseStudy2CompSet-NoSalary.csv",header=TRUE)
head(NoSalary.df)
##    ID Age Attrition    BusinessTravel DailyRate             Department
## 1 871  43        No Travel_Frequently      1422                  Sales
## 2 872  33        No     Travel_Rarely       461 Research & Development
## 3 873  55       Yes     Travel_Rarely       267                  Sales
## 4 874  36        No        Non-Travel      1351 Research & Development
## 5 875  27        No     Travel_Rarely      1302 Research & Development
## 6 876  39       Yes     Travel_Rarely       895                  Sales
##   DistanceFromHome Education   EducationField EmployeeCount EmployeeNumber
## 1                2         4    Life Sciences             1           1849
## 2               13         1    Life Sciences             1            995
## 3               13         4        Marketing             1           1372
## 4                9         4    Life Sciences             1           1949
## 5               19         3            Other             1           1619
## 6                5         3 Technical Degree             1             42
##   EnvironmentSatisfaction Gender HourlyRate JobInvolvement JobLevel
## 1                       1   Male         92              3        2
## 2                       2 Female         53              3        1
## 3                       1   Male         85              4        4
## 4                       1   Male         66              4        1
## 5                       4   Male         67              2        1
## 6                       4   Male         56              3        2
##                 JobRole JobSatisfaction MaritalStatus MonthlyRate
## 1       Sales Executive               4       Married       19246
## 2    Research Scientist               4        Single       17241
## 3       Sales Executive               3        Single        9277
## 4 Laboratory Technician               2       Married        9238
## 5 Laboratory Technician               1      Divorced       16290
## 6  Sales Representative               4       Married        3335
##   NumCompaniesWorked Over18 OverTime PercentSalaryHike PerformanceRating
## 1                  1      Y       No                20                 4
## 2                  3      Y       No                18                 3
## 3                  6      Y      Yes                17                 3
## 4                  1      Y       No                22                 4
## 5                  1      Y       No                11                 3
## 6                  3      Y       No                14                 3
##   RelationshipSatisfaction StandardHours StockOptionLevel TotalWorkingYears
## 1                        3            80                1                 7
## 2                        1            80                0                 5
## 3                        3            80                0                24
## 4                        2            80                0                 5
## 5                        1            80                2                 7
## 6                        3            80                1                19
##   TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole
## 1                     5               3              7                  7
## 2                     4               3              3                  2
## 3                     2               2             19                  7
## 4                     3               3              5                  4
## 5                     3               3              7                  7
## 6                     6               4              1                  0
##   YearsSinceLastPromotion YearsWithCurrManager
## 1                       7                    7
## 2                       0                    2
## 3                       3                    8
## 4                       0                    2
## 5                       0                    7
## 6                       0                    0
dim(NoSalary.df)
## [1] 300  35
NoSalary.df$MonthlyIncome_LM <- predict(case2.salary.stepwise, newdata = NoSalary.df)
head(NoSalary.df$MonthlyIncome_LM)
## [1]  5970.287  2323.709 14207.384  2377.718  1837.006  7202.706
NoSalary.df$MonthlyIncome_RF <- predict(case2_salary.stepwise.rf, newdata = NoSalary.df)
head(NoSalary.df$MonthlyIncome_RF)
## [1]  5735.198  2610.919 12130.223  2321.945  2424.701  6051.449

Storing the predictions in the new csv files

We have saved the predictions of the original test data in the Salary_LM.csv and Salary_RF.csv

output.LM=data.frame(Id=NoSalary.df$ID,NoSalary.df$MonthlyIncome_LM)
output.RF=data.frame(Id=NoSalary.df$ID,NoSalary.df$MonthlyIncome_RF)

head(output.LM)
##    Id NoSalary.df.MonthlyIncome_LM
## 1 871                     5970.287
## 2 872                     2323.709
## 3 873                    14207.384
## 4 874                     2377.718
## 5 875                     1837.006
## 6 876                     7202.706
head(output.RF)
##    Id NoSalary.df.MonthlyIncome_RF
## 1 871                     5735.198
## 2 872                     2610.919
## 3 873                    12130.223
## 4 874                     2321.945
## 5 875                     2424.701
## 6 876                     6051.449
write.csv(output.LM,file="Salary_LM.csv",row.names = FALSE)
write.csv(output.RF,file="Salary_RF.csv",row.names = FALSE)

Model for Attrition

Removing the MonthlyIncome.categorize from the dataframe and creating the model for Attrition

We will create a random forest model for looking at the top influential variables among the 27 variables which leads to Attrition after removing the Monthly income variable

Attrition

Top 5 most influential were:

  • OverTime
  • MonthlyIncome
  • StockOptionLevel
  • MaritalStatus
  • Age
case2_numeric -> case2_attrition
dim(case2_attrition)
## [1] 870  28
# Random forest for Attrition
case2_attrition_features <- randomForest(Attrition ~.-MonthlyIncome.categorize, 
                                     data = case2_attrition, 
                                     importance = TRUE)
## Warning in randomForest.default(m, y, ...): The response has five or fewer
## unique values. Are you sure you want to do regression?
varImpPlot(case2_attrition_features)

Looking at Top 5 infuential variables correlation with Attrition

  • Looking at the correlation plot for the top 5 influential factors that leads to attrition.

  • Attrition & OverTime = 0.27

  • Attrition & MOnthlyIncome = -0.15

  • Attrition & StockOptionLevel = -0.15

  • Attrition & Age = -0.15

  • Attrition & MaritalStatus = 0.20

attrition.factors=data.frame(OverTime=case2_numeric$OverTime,MonthlyIncome=case2$MonthlyIncome,
                             StockOptionLevel=case2_numeric$StockOptionLevel,Attrition=case2_numeric$Attrition,
                             Age=case2$Age,MaritalStatus=case2_numeric$MaritalStatus)
str(attrition.factors)
## 'data.frame':    870 obs. of  6 variables:
##  $ OverTime        : int  1 1 1 1 2 1 2 2 2 1 ...
##  $ MonthlyIncome   : int  4403 19626 9362 10422 3760 8793 2127 6694 2220 5063 ...
##  $ StockOptionLevel: int  1 0 0 2 0 2 0 3 1 1 ...
##  $ Attrition       : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ Age             : int  32 40 35 32 24 27 41 37 34 34 ...
##  $ MaritalStatus   : int  1 3 3 2 3 1 2 1 2 2 ...
corrplot(cor(attrition.factors), order = "alphabet",
         col = brewer.pal(n = 8, name = "RdBu"),method="number")

cor(case2_numeric$MaritalStatus,case2_numeric$Attrition)
## [1] 0.197015

Looking at OverTime for Attrition

Visually looking at the graph it seems like the employees doing Over time are more likely to leave.

Numerically approximately 57.14% of the employees doing overTime are likely to leave.

ggplot(case2,aes(fill=Attrition,x=OverTime))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+facet_grid(rows = vars(Attrition))

Looking at Monthly Income for Attrition

Visually looking at the graph it seems like the employees earning Under 30k and between 30k to 60k are more likely to leave.

Numerically it is approximately 70.71% of the employees with Attrition=Yes.

ggplot(case2,aes(fill=Attrition,x=MonthlyIncome.categorize))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+facet_grid(rows = vars(Attrition))

Looking at Stock Option Level for Attrition

Visually looking at the graph it seems like the employees having 0 Stock Option Level are more likely to leave.

Numerically it is approximately 70.0% of the employees with Attrition=Yes.

ggplot(case2,aes(fill=Attrition,x=StockOptionLevel))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+facet_grid(rows = vars(Attrition))

Looking at Age for Attrition

Visually looking at the graph it seems like the employees of 19 to 30 years age are more likely to leave.

Numerically it is approximately 40.71% of the employees with Attrition=Yes.

ggplot(case2,aes(fill=Attrition,x=AgeEmp))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle = 90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+facet_grid(rows = vars(Attrition))

Looking at Marital Status for Attrition

Visually looking at the graph it seems like the employees who are single are more likely to leave.

Numerically it is approximately 50% of the employees with Attrition=Yes.

ggplot(case2,aes(fill=Attrition,x=MaritalStatus))+geom_bar(position="stack",stat="count",na.rm = TRUE)+
  theme(axis.text.x = element_text(angle=90))+geom_text(aes(label=..count..),stat="count",position=position_stack(0.5))+
facet_grid(rows = vars(Attrition))

Building the model

Now we will focus on Attrition and will implement the following algorithms for building the model:

K-Nearest Neighbor(KNN) Classifier

Random Forest Classifier

Logistic Regression

First we need to split the data into a training & testing set. 75% of our data will be used for the training set and will be used to create the model. The remaining 20% is for the test set, which will be used to validate actual values vs predicted values using our model.

We need to measure the models:

  • Accuracy: correct results / all results
  • Sensitivity: correctly predicted Attrition:No / All actual “No”
  • Specificity: correctly predicted Attrition:Yes / All actual “Yes”
dim(case2)
## [1] 870  33
case2_attrition.knn=case2[,-c(28,29,30,31,32,33)]
str(case2_attrition.knn)
## 'data.frame':    870 obs. of  27 variables:
##  $ Age                     : int  32 40 35 32 24 27 41 37 34 34 ...
##  $ Attrition               : chr  "No" "No" "No" "No" ...
##  $ BusinessTravel          : chr  "Travel_Rarely" "Travel_Rarely" "Travel_Frequently" "Travel_Rarely" ...
##  $ Department              : chr  "Sales" "Research & Development" "Research & Development" "Sales" ...
##  $ DistanceFromHome        : int  13 14 18 1 2 10 5 10 10 10 ...
##  $ Education               : int  4 3 2 4 1 2 5 4 4 4 ...
##  $ EducationField          : chr  "Life Sciences" "Medical" "Life Sciences" "Marketing" ...
##  $ EnvironmentSatisfaction : int  2 3 3 3 1 4 2 4 3 4 ...
##  $ Gender                  : chr  "Male" "Male" "Male" "Female" ...
##  $ JobInvolvement          : int  3 2 3 3 3 3 4 2 3 2 ...
##  $ JobLevel                : int  2 5 3 3 1 3 1 2 1 2 ...
##  $ JobRole                 : chr  "Sales Executive" "Research Director" "Manufacturing Director" "Sales Executive" ...
##  $ JobSatisfaction         : int  4 3 4 4 4 1 3 4 3 3 ...
##  $ MaritalStatus           : chr  "Divorced" "Single" "Single" "Married" ...
##  $ MonthlyIncome           : int  4403 19626 9362 10422 3760 8793 2127 6694 2220 5063 ...
##  $ NumCompaniesWorked      : int  2 1 2 1 1 1 2 2 1 1 ...
##  $ OverTime                : chr  "No" "No" "No" "No" ...
##  $ PercentSalaryHike       : int  11 14 11 19 13 21 12 14 19 14 ...
##  $ RelationshipSatisfaction: int  3 1 3 3 3 3 1 3 4 2 ...
##  $ StockOptionLevel        : int  1 0 0 2 0 2 0 3 1 1 ...
##  $ TotalWorkingYears       : int  8 21 10 14 6 9 7 8 1 8 ...
##  $ TrainingTimesLastYear   : int  3 2 2 3 2 4 5 5 2 3 ...
##  $ WorkLifeBalance         : int  2 4 3 3 3 2 2 3 3 2 ...
##  $ YearsAtCompany          : int  5 20 2 14 6 9 4 1 1 8 ...
##  $ YearsInCurrentRole      : int  2 7 2 10 3 7 2 0 1 2 ...
##  $ YearsSinceLastPromotion : int  0 4 2 5 1 1 0 0 0 7 ...
##  $ YearsWithCurrManager    : int  3 9 2 7 3 7 3 0 0 7 ...
attrition.partition <- createDataPartition(case2_attrition.knn$Attrition, p = 0.75, list = F)
attrition.train <- case2_attrition.knn[attrition.partition,] 
attrition.test <- case2_attrition.knn[-attrition.partition,]

# validate train and test sets
head(attrition.train)
##   Age Attrition    BusinessTravel             Department DistanceFromHome
## 1  32        No     Travel_Rarely                  Sales               13
## 2  40        No     Travel_Rarely Research & Development               14
## 4  32        No     Travel_Rarely                  Sales                1
## 5  24        No Travel_Frequently Research & Development                2
## 7  41        No     Travel_Rarely Research & Development                5
## 8  37        No     Travel_Rarely                  Sales               10
##   Education   EducationField EnvironmentSatisfaction Gender JobInvolvement
## 1         4    Life Sciences                       2   Male              3
## 2         3          Medical                       3   Male              2
## 4         4        Marketing                       3 Female              3
## 5         1 Technical Degree                       1 Female              3
## 7         5          Medical                       2   Male              4
## 8         4    Life Sciences                       4 Female              2
##   JobLevel            JobRole JobSatisfaction MaritalStatus MonthlyIncome
## 1        2    Sales Executive               4      Divorced          4403
## 2        5  Research Director               3        Single         19626
## 4        3    Sales Executive               4       Married         10422
## 5        1 Research Scientist               4        Single          3760
## 7        1 Research Scientist               3       Married          2127
## 8        2    Sales Executive               4      Divorced          6694
##   NumCompaniesWorked OverTime PercentSalaryHike RelationshipSatisfaction
## 1                  2       No                11                        3
## 2                  1       No                14                        1
## 4                  1       No                19                        3
## 5                  1      Yes                13                        3
## 7                  2      Yes                12                        1
## 8                  2      Yes                14                        3
##   StockOptionLevel TotalWorkingYears TrainingTimesLastYear WorkLifeBalance
## 1                1                 8                     3               2
## 2                0                21                     2               4
## 4                2                14                     3               3
## 5                0                 6                     2               3
## 7                0                 7                     5               2
## 8                3                 8                     5               3
##   YearsAtCompany YearsInCurrentRole YearsSinceLastPromotion
## 1              5                  2                       0
## 2             20                  7                       4
## 4             14                 10                       5
## 5              6                  3                       1
## 7              4                  2                       0
## 8              1                  0                       0
##   YearsWithCurrManager
## 1                    3
## 2                    9
## 4                    7
## 5                    3
## 7                    3
## 8                    0
head(attrition.test)
##    Age Attrition    BusinessTravel             Department DistanceFromHome
## 3   35        No Travel_Frequently Research & Development               18
## 6   27        No Travel_Frequently Research & Development               10
## 18  46        No        Non-Travel Research & Development                7
## 21  36        No     Travel_Rarely Research & Development                9
## 25  33        No     Travel_Rarely Research & Development                1
## 28  33       Yes     Travel_Rarely                  Sales                9
##    Education EducationField EnvironmentSatisfaction Gender JobInvolvement
## 3          2  Life Sciences                       3   Male              3
## 6          2  Life Sciences                       4   Male              3
## 18         4        Medical                       3 Female              3
## 21         2        Medical                       2   Male              2
## 25         3  Life Sciences                       2 Female              2
## 28         4      Marketing                       1 Female              3
##    JobLevel                   JobRole JobSatisfaction MaritalStatus
## 3         3    Manufacturing Director               4        Single
## 6         3    Manufacturing Director               1      Divorced
## 18        2    Manufacturing Director               3       Married
## 21        2    Manufacturing Director               2      Divorced
## 25        2 Healthcare Representative               4        Single
## 28        2           Sales Executive               1        Single
##    MonthlyIncome NumCompaniesWorked OverTime PercentSalaryHike
## 3           9362                  2       No                11
## 6           8793                  1       No                21
## 18          5258                  2       No                14
## 21          8847                  2      Yes                11
## 25          6949                  0       No                14
## 28          8224                  0      Yes                17
##    RelationshipSatisfaction StockOptionLevel TotalWorkingYears
## 3                         3                0                10
## 6                         3                2                 9
## 18                        3                0                 7
## 21                        3                1                13
## 25                        1                0                 6
## 28                        1                0                 6
##    TrainingTimesLastYear WorkLifeBalance YearsAtCompany YearsInCurrentRole
## 3                      2               3              2                  2
## 6                      4               2              9                  7
## 18                     2               4              1                  0
## 21                     2               3              3                  2
## 25                     3               3              5                  0
## 28                     3               3              5                  2
##    YearsSinceLastPromotion YearsWithCurrManager
## 3                        2                    2
## 6                        1                    7
## 18                       0                    0
## 21                       0                    2
## 25                       1                    4
## 28                       0                    3
dim(attrition.train)
## [1] 653  27
dim(attrition.test)
## [1] 217  27

K-Nearest Neighbor for Attrition

In the K-Nearest Neighbor(KNN), we will use 5-fold cross validation and 50 repeats to create the model for predicting the attrition.

  • We obtained the accuracy above 80%, sensitivity above 80% and specificity above 70% everytime we run the model with different train and test set values.
set.seed(200)
train.knn<- trainControl(
  method = "repeatedcv",
  number = 5,
  repeats = 50,
  summaryFunction = twoClassSummary,
  classProbs = TRUE
)

# KNN on Training Set

attrition.knn <- train(
  Attrition ~ .,
  data = attrition.train,
  method = "knn",
  metric = "Spec",
  trControl = train.knn,
  preProcess = c("center","scale"),
  tuneLength = 20
)

# Adding predictions to Test Data
predict(attrition.knn, newdata = attrition.test ) -> attrition.test$Attrition_KNN
# creating confusion matrix
confusionMatrix(
  table(attrition.test$Attrition, attrition.test$Attrition_KNN )
)
## Confusion Matrix and Statistics
## 
##      
##        No Yes
##   No  180   2
##   Yes  27   8
##                                           
##                Accuracy : 0.8664          
##                  95% CI : (0.8137, 0.9086)
##     No Information Rate : 0.9539          
##     P-Value [Acc > NIR] : 1               
##                                           
##                   Kappa : 0.3058          
##                                           
##  Mcnemar's Test P-Value : 8.324e-06       
##                                           
##             Sensitivity : 0.8696          
##             Specificity : 0.8000          
##          Pos Pred Value : 0.9890          
##          Neg Pred Value : 0.2286          
##              Prevalence : 0.9539          
##          Detection Rate : 0.8295          
##    Detection Prevalence : 0.8387          
##       Balanced Accuracy : 0.8348          
##                                           
##        'Positive' Class : No              
## 

Random Forest for Attrition

In the Random Forest, we will use 5-fold cross validation and 50 repeats to create the model for predicting the attrition.

  • We obtained the accuracy above 85%, sensitivity above 85% and specificity above 70% everytime we run the model with different train and test set values.
set.seed(200)

train.knn<- trainControl(
  method = "repeatedcv",
  number = 5,
  repeats = 50,
  summaryFunction = twoClassSummary,
  classProbs = TRUE
)
train.forest<- trainControl(
  method = "repeatedcv",
  number = 5,
  repeats=25
)
metric="Accuracy"

# Random Forest
train(as.factor(Attrition) ~ .,
  data = attrition.train,
  method = "rf",
  metric = "Accuracy",
  trControl = train.forest
 
  
) -> attrition.rf

predict(attrition.rf, newdata = attrition.test ) -> attrition.test$Attrition_RF
# creating confusion matrix
confusionMatrix(
  table(attrition.test$Attrition, attrition.test$Attrition_RF )
)
## Confusion Matrix and Statistics
## 
##      
##        No Yes
##   No  180   2
##   Yes  28   7
##                                           
##                Accuracy : 0.8618          
##                  95% CI : (0.8086, 0.9047)
##     No Information Rate : 0.9585          
##     P-Value [Acc > NIR] : 1               
##                                           
##                   Kappa : 0.27            
##                                           
##  Mcnemar's Test P-Value : 5.01e-06        
##                                           
##             Sensitivity : 0.8654          
##             Specificity : 0.7778          
##          Pos Pred Value : 0.9890          
##          Neg Pred Value : 0.2000          
##              Prevalence : 0.9585          
##          Detection Rate : 0.8295          
##    Detection Prevalence : 0.8387          
##       Balanced Accuracy : 0.8216          
##                                           
##        'Positive' Class : No              
## 

Logistic Regression for Attrition

In the Logistic Regression, we will use 5-fold cross validation and 50 repeats to create the model for predicting the attrition.

  • We obtained the accuracy above 85%, sensitivity above 85% and specificity above 70% everytime we run the model with different train and test set values.
train.glm<- trainControl(
  method = "repeatedcv",
  number = 5,
  repeats = 50,
)
set.seed(200)
attrition.glm.model <- train(as.factor(Attrition)~., attrition.train , method = 'glm',trControl = train.forest)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
train=case2_numeric
glm.fit=glm(Attrition~.,data=train)
#Predict
attrition.glm.pred <- predict(attrition.glm.model,newdata=attrition.test)
#Print confusion matrix
confusionMatrix(
  table(attrition.test$Attrition, attrition.glm.pred )
)
## Confusion Matrix and Statistics
## 
##      attrition.glm.pred
##        No Yes
##   No  171  11
##   Yes  19  16
##                                           
##                Accuracy : 0.8618          
##                  95% CI : (0.8086, 0.9047)
##     No Information Rate : 0.8756          
##     P-Value [Acc > NIR] : 0.7680          
##                                           
##                   Kappa : 0.437           
##                                           
##  Mcnemar's Test P-Value : 0.2012          
##                                           
##             Sensitivity : 0.9000          
##             Specificity : 0.5926          
##          Pos Pred Value : 0.9396          
##          Neg Pred Value : 0.4571          
##              Prevalence : 0.8756          
##          Detection Rate : 0.7880          
##    Detection Prevalence : 0.8387          
##       Balanced Accuracy : 0.7463          
##                                           
##        'Positive' Class : No              
## 

Predictions for Attrition

Validating KNN on Entire Training Data Set

For the prediction on the entire training set, we found the following results:

  • We obtained the accuracy above 80%, sensitivity above 80% and specificity above 80% everytime we run the model entire training set.
# generating predictions on test data
case2$Attrition_KNN <- predict(attrition.knn, newdata = case2)

# creating confusion matrix for KNN
confusionMatrix(
  table(case2$Attrition, case2$Attrition_KNN )
)
## Confusion Matrix and Statistics
## 
##      
##        No Yes
##   No  724   6
##   Yes 106  34
##                                           
##                Accuracy : 0.8713          
##                  95% CI : (0.8472, 0.8928)
##     No Information Rate : 0.954           
##     P-Value [Acc > NIR] : 1               
##                                           
##                   Kappa : 0.3298          
##                                           
##  Mcnemar's Test P-Value : <2e-16          
##                                           
##             Sensitivity : 0.8723          
##             Specificity : 0.8500          
##          Pos Pred Value : 0.9918          
##          Neg Pred Value : 0.2429          
##              Prevalence : 0.9540          
##          Detection Rate : 0.8322          
##    Detection Prevalence : 0.8391          
##       Balanced Accuracy : 0.8611          
##                                           
##        'Positive' Class : No              
## 

Validating Random Forest on Entire Training Data Set

For the prediction on the entire training set, we found the following results:

  • We obtained the accuracy above 90%, sensitivity above 90% and specificity above 90% everytime we run the model entire training set.
# generating predictions on test data
case2$Attrition_RF <- predict(attrition.rf, newdata = case2)

# creating confusion matrix for RF
confusionMatrix(
  table(case2$Attrition, case2$Attrition_RF )
)
## Confusion Matrix and Statistics
## 
##      
##        No Yes
##   No  728   2
##   Yes  28 112
##                                           
##                Accuracy : 0.9655          
##                  95% CI : (0.9511, 0.9766)
##     No Information Rate : 0.869           
##     P-Value [Acc > NIR] : < 2.2e-16       
##                                           
##                   Kappa : 0.8619          
##                                           
##  Mcnemar's Test P-Value : 5.01e-06        
##                                           
##             Sensitivity : 0.9630          
##             Specificity : 0.9825          
##          Pos Pred Value : 0.9973          
##          Neg Pred Value : 0.8000          
##              Prevalence : 0.8690          
##          Detection Rate : 0.8368          
##    Detection Prevalence : 0.8391          
##       Balanced Accuracy : 0.9727          
##                                           
##        'Positive' Class : No              
## 

Validating Logistic Regression on Entire Training Data Set

For the prediction on the entire training set, we found the following results:

  • We obtained the accuracy above 85%, sensitivity above 85% and specificity above 75% everytime we run the model entire training set.
# generating predictions on test data
case2$Attrition_GLM <- predict(attrition.glm.model, newdata = case2)

# creating confusion matrix for RF
confusionMatrix(
  table(case2$Attrition, case2$Attrition_GLM )
)
## Confusion Matrix and Statistics
## 
##      
##        No Yes
##   No  707  23
##   Yes  70  70
##                                           
##                Accuracy : 0.8931          
##                  95% CI : (0.8706, 0.9129)
##     No Information Rate : 0.8931          
##     P-Value [Acc > NIR] : 0.5276          
##                                           
##                   Kappa : 0.542           
##                                           
##  Mcnemar's Test P-Value : 1.842e-06       
##                                           
##             Sensitivity : 0.9099          
##             Specificity : 0.7527          
##          Pos Pred Value : 0.9685          
##          Neg Pred Value : 0.5000          
##              Prevalence : 0.8931          
##          Detection Rate : 0.8126          
##    Detection Prevalence : 0.8391          
##       Balanced Accuracy : 0.8313          
##                                           
##        'Positive' Class : No              
## 

Reading the original test data for Attrition and generating the predictions

The predictions generated by KNN, Random Forest, and Logistic Regression are stored in the original test data setin separate variables with following names :

  • Attrition_KNN = Predictions for K-Nearest Neighbor
  • Attrition_RF = Predictions for Random Forest
  • Attrition_GLM = Predictions for Logistic Regression
NoAttrition.df=read.csv("https://raw.githubusercontent.com/RashmiAPatel19/SMU_MSDS_6306_CaseStudy2_Spring2021/main/CaseStudy2CompSet%20No%20Attrition.csv",header=TRUE)
head(NoAttrition.df)
##     ID Age    BusinessTravel DailyRate             Department DistanceFromHome
## 1 1171  35     Travel_Rarely       750 Research & Development               28
## 2 1172  33     Travel_Rarely       147        Human Resources                2
## 3 1173  26     Travel_Rarely      1330 Research & Development               21
## 4 1174  55     Travel_Rarely      1311 Research & Development                2
## 5 1175  29     Travel_Rarely      1246                  Sales               19
## 6 1176  51 Travel_Frequently      1456 Research & Development                1
##   Education  EducationField EmployeeCount EmployeeNumber
## 1         3   Life Sciences             1           1596
## 2         3 Human Resources             1           1207
## 3         3         Medical             1           1107
## 4         3   Life Sciences             1            505
## 5         3   Life Sciences             1           1497
## 6         4         Medical             1            145
##   EnvironmentSatisfaction Gender HourlyRate JobInvolvement JobLevel
## 1                       2   Male         46              4        2
## 2                       2   Male         99              3        1
## 3                       1   Male         37              3        1
## 4                       3 Female         97              3        4
## 5                       3   Male         77              2        2
## 6                       1 Female         30              2        3
##                     JobRole JobSatisfaction MaritalStatus MonthlyIncome
## 1     Laboratory Technician               3       Married          3407
## 2           Human Resources               3       Married          3600
## 3     Laboratory Technician               3      Divorced          2377
## 4                   Manager               4        Single         16659
## 5           Sales Executive               3      Divorced          8620
## 6 Healthcare Representative               1        Single          7484
##   MonthlyRate NumCompaniesWorked Over18 OverTime PercentSalaryHike
## 1       25348                  1      Y       No                17
## 2        8429                  1      Y       No                13
## 3       19373                  1      Y       No                20
## 4       23258                  2      Y      Yes                13
## 5       23757                  1      Y       No                14
## 6       25796                  3      Y       No                20
##   PerformanceRating RelationshipSatisfaction StandardHours StockOptionLevel
## 1                 3                        4            80                2
## 2                 3                        4            80                1
## 3                 4                        3            80                1
## 4                 3                        3            80                0
## 5                 3                        3            80                2
## 6                 4                        3            80                0
##   TotalWorkingYears TrainingTimesLastYear WorkLifeBalance YearsAtCompany
## 1                10                     3               2             10
## 2                 5                     2               3              5
## 3                 1                     0               2              1
## 4                30                     2               3              5
## 5                10                     3               3             10
## 6                23                     1               2             13
##   YearsInCurrentRole YearsSinceLastPromotion YearsWithCurrManager
## 1                  9                       6                    8
## 2                  4                       1                    4
## 3                  1                       0                    0
## 4                  4                       1                    2
## 5                  7                       0                    4
## 6                 12                      12                    8
dim(NoAttrition.df)
## [1] 300  35

Storing the predictions in the new csv files

We have saved the predictions of the original test data in the Attrition_KNN.csv, Attrition_RF.csv and Attrition_GLM.csv

# creating new attrition in original test data with KNN model predicted Attrition
NoAttrition.df$Attrition_KNN <- predict(attrition.knn, NoAttrition.df)
output.knn=data.frame(Id=NoAttrition.df$ID,NoAttrition.df$Attrition_KNN)

# creating new attrition in original test data with Random Forest model predicted Attrition
NoAttrition.df$Attrition_RF <- predict(attrition.rf, NoAttrition.df)
output.rf=data.frame(Id=NoAttrition.df$ID,NoAttrition.df$Attrition_RF)

# creating new attrition in original test data with Logistic Regression model predicted Attrition
NoAttrition.df$Attrition_GLM <- predict(attrition.glm.model, NoAttrition.df)
output.glm=data.frame(Id=NoAttrition.df$ID,NoAttrition.df$Attrition_GLM)

head(output.knn)
##     Id NoAttrition.df.Attrition_KNN
## 1 1171                           No
## 2 1172                           No
## 3 1173                           No
## 4 1174                           No
## 5 1175                           No
## 6 1176                           No
head(output.rf)
##     Id NoAttrition.df.Attrition_RF
## 1 1171                          No
## 2 1172                          No
## 3 1173                          No
## 4 1174                          No
## 5 1175                          No
## 6 1176                          No
head(output.glm)
##     Id NoAttrition.df.Attrition_GLM
## 1 1171                           No
## 2 1172                           No
## 3 1173                           No
## 4 1174                           No
## 5 1175                           No
## 6 1176                          Yes
write.csv(output.knn,file="Attrition_KNN.csv",row.names = FALSE)
write.csv(output.rf,file="Attrition_RF.csv",row.names = FALSE)
write.csv(output.glm,file="Attrition_GLM.csv",row.names = FALSE)